in reply to Re: LWP error 500
in thread LWP error 500
Hi,
If your proxy asks you for a userid & password you should do the following:
#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = new LWP::UserAgent; $ua->agent("mYpErLsCrIpT.pl/3.0"); $ua->env_proxy; $ua->proxy(http=>'http://proxy.pxpost:8080'); my $req = new HTTP::Request "GET" => "http://www.slashdot.org"; $req->proxy_authorization_basic('gargle','ImNoTgOnNaTeLl'); print $ua->request($req)->as_string;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: LWP error 500
by inman (Curate) on Sep 01, 2005 at 08:54 UTC |