⭐ in reply to How do I retrieve .htpasswd protected html documents?
use LWP::UserAgent; my $ua = new LWP::UserAgent; my $req = new HTTP::Request 'GET', 'http://www.you.com/dir'; $req->authorization_basic('userid', 'password'); my $result = $ua->request($req)->as_string;
Read the POD for the module, as well as lwp-cook for other options/uses.
Cheers,
KM
|
|---|