Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
How to tell WWW::Mechanize to work with HTTPS proxy? I have this code:
use WWW::Mechanize; print "WWW::Mechanize: ", $WWW::Mechanize::VERSION, "\n"; print "LWP : ", $LWP::UserAgent::VERSION, "\n"; my $mech = WWW::Mechanize->new(); $mech->proxy( [ 'http', 'https' ], "https://204.228.129.46:8080/" ); $mech->add_handler("request_send", sub { shift->dump; return }); $mech->add_handler("response_done", sub { shift->dump; return }); $mech->get("http://people.iu.edu/");
and below is result I have:
WWW::Mechanize: 1.73 LWP : 6.06 GET http://people.iu.edu/ Accept-Encoding: gzip User-Agent: WWW-Mechanize/1.73 (no content) 500 Can't connect to 204.228.129.46:8080 Content-Type: text/plain Client-Date: Sat, 31 May 2014 02:26:15 GMT Client-Warning: Internal response Can't connect to 204.228.129.46:8080\n LWP::Protocol::https::Socket: SSL connect attempt failed with unknown +error SSL wants a read first at c:/Perl/site/lib/LWP/Protocol/http.pm + line 41.\n Error GETing http://people.iu.edu/: Can't connect to 204.228.129.46:80 +80
If the proxy is HTTP based I have no errors...t connect to 204.228.129.46:8080 Content-Type: text/plain Client-Date: Sat, 31 May 2014 02:26:15 GMT Client-Warning: Internal response Can

In reply to WWW::Mechanize and HTTPS proxy by Gangabass

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-20 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found