Re: authentication

Ilya Ketris (ilya@gde.to)
Wed, 10 Nov 1999 18:29:15 +0200


On Wed, Nov 10, 1999 at 10:41:39AM -0500, Tac/Smokescreen Action Network wrote:
> I'm stuck on what looks to be very simple -- sending in a username and
> password to a site:
> 
> use LWP;
> 
> my $ua = LWP::UserAgent->new;
> $ua->credentials("sunfinder.smokescreen.org","Web Server","tac","password");
> $url =
> "http://sunfinder.smokescreen.org/pv/lead/hQuote.cfm?ResearchID=1781";
> $req = HTTP::Request->new('GET', $url);
> $response = $ua->request($req);
> print $response->as_string;

	Try
	$req->authorization_basic ("tac","password");

-- 
Ilya Ketris <ilya@gde.to>