1LWP::Protocol::connect(U3s)er Contributed Perl DocumentatLiWoPn::Protocol::connect(3)
2
3
4
6 LWP::Protocol::connect - Provides HTTP/CONNECT proxy support for
7 LWP::UserAgent
8
10 use LWP::UserAgent;
11
12 $ua = LWP::UserAgent->new();
13 $ua->proxy('https', 'connect://proxyhost.domain:3128/');
14
15 $ua->get('https://www.somesslsite.com');
16
18 If you pass the authentication within the userinfo string of the proxy
19 url a Basic authentication header will always be generated and sent to
20 the proxy.
21
22 $ua->proxy('https', 'connect://user:pw@proxyhost.domain:3128');
23
24 The more general way is to add the credentials of the proxy to the $ua
25 object.
26
27 $ua->credentials("localhost:3128", "Squid proxy-caching web server", "user", "pw");
28
29 In this case the first request to the proxy will fail with a "407 Proxy
30 Auth. Required". This will cause LWP::UserAgent to choose the right
31 LWP::Authen::<method> module to add the authentication and retry.
32
34 The LWP::Protocol::connect module provides support for using https over
35 a proxy via the HTTP/CONNECT method.
36
38 IO::Socket::SSL, LWP::Protocol::https
39
41 Copyright 2013 Markus Benning <me@w3r3wolf.de>
42
43 This library is free software; you can redistribute it and/or modify it
44 under the same terms as Perl itself.
45
46
47
48perl v5.30.0 2019-07-26 LWP::Protocol::connect(3)