Documents protected by basic authorization can easily be accessed like this:
use LWP::UserAgent; $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET => 'http://www.asite.com/'); $req->authorization_basic('myuid', 'mypassword'); print $ua->request($req)->as_string;
The other alternative is to provide a subclass of LWP::UserAgent that overrides the get_basic_credentials() method. Study the lwp-request program for an example of this.
In reply to Re: HTTP::Headers, HTTP::Request, Authentication, LWP::Useragent
by Daddio
in thread HTTP::Headers, HTTP::Request, Authentication, LWP::Useragent
by heyman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |