Thursday, April 21, 2011

How do I configure WWW::Mechanize to work through a proxy?

I sit behind a proxy and have HTTP and WWW::Mechanize working OK locally.

But advice || pointers as to how to get through a proxy please.

Regards Ian

From stackoverflow
  • WWW::Mechanize is an extension of LWP::UserAgent:

    WWW::Mechanize is a proper subclass of LWP::UserAgent and you can also use any of LWP::UserAgent's methods.

    So you can just use ->env_proxy, or ->proxy — as described in the manual.

  • Excellent clue depesz||cjm.

    It was actually a matter of "rtfm". Forgot the need for the environment variable "HTTP_PROXY". Do not get old you guys !!

    Ian

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.