-
-
07 Jan 2014 12:28:51 UTC
- Distribution: LWP-Protocol-connect
- Module version: 6.09
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (1251 / 0 / 0)
- Kwalitee
Bus factor: 1- 27.27% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (14.85KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
LWP::Protocol::connect - Provides HTTP/CONNECT proxy support for LWP::UserAgent
SYNOPSIS
use LWP::UserAgent; $ua = LWP::UserAgent->new(); $ua->proxy('https', 'connect://proxyhost.domain:3128/'); $ua->get('https://www.somesslsite.com');
Proxy Authentication
If you pass the authentication within the userinfo string of the proxy url a Basic authentication header will always be generated and sent to the proxy.
$ua->proxy('https', 'connect://user:pw@proxyhost.domain:3128');
The more general way is to add the credentials of the proxy to the $ua object.
$ua->credentials("localhost:3128", "Squid proxy-caching web server", "user", "pw");
In this case the first request to the proxy will fail with a "407 Proxy Auth. Required". This will cause LWP::UserAgent to choose the right LWP::Authen::<method> module to add the authentication and retry.
DESCRIPTION
The LWP::Protocol::connect module provides support for using https over a proxy via the HTTP/CONNECT method.
SEE ALSO
IO::Socket::SSL, LWP::Protocol::https
COPYRIGHT
Copyright 2013 Markus Benning <me@w3r3wolf.de>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install LWP::Protocol::connect, copy and paste the appropriate command in to your terminal.
cpanm LWP::Protocol::connect
perl -MCPAN -e shell install LWP::Protocol::connect
For more information on module installation, please visit the detailed CPAN module installation guide.