I have a proxy with IP, Port, Login and Password.
Is it possible to use this proxy with Perl’s WWW::Mechanize?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure if there’s a native way but here’s a workaround which is claimed to work:
http://www.perlmonks.org/?node_id=269358
It’s based on setting
$ENV{HTTP_PROXY}to “http://login:password@proxyserver” where both login and password must be URI-encoded.Also, WWW::Mechanize is a subclass of
LWP::UserAgent, and as such, what works in LWP should work on Mechanize (example from LWP Cookbook, PROXIES section)