sierrathedog04 has asked for the wisdom of the Perl Monks concerning the following question:
produces the following output:use HTTP::Request::Common qw(POST); use LWP::UserAgent; use strict; my $ua = LWP::UserAgent->new(); my $req = POST 'http://home.sff.net/login.asp', [ username => 'jonatha +nmark', RecordID => 4142]; print "The netloc is" , $req->url->netloc, ". "; $ua->credentials($req->url->netloc, "home.sff.net", 'jonathanmark', 'n +ottherealpassword'); my$content = $ua->request($req)->as_string; print "Content is $content";
If anyone has any idea I would really appreciate it.The netloc is: home.sff.net. Content is HTTP/1.0 401 (Unauthorized) Ac +cess Denied Cache-Control: private Date: Fri, 01 Mar 2002 01:46:04 GMT Via: 1.1 Dyn-EH-NetCache (NetCache NetApp/5.1R2) Server: Greyware Web Server WWW-Authenticate: Basic realm="home.sff.net" Content-Length: 24 Content-Type: text/html Client-Date: Fri, 01 Mar 2002 01:48:51 GMT Client-Peer: 208.14.208.55:80 Error: Access is Denied.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unable to get LWP Basic Authentication to Work
by Zaxo (Archbishop) on Mar 01, 2002 at 05:34 UTC | |
by sierrathedog04 (Hermit) on Mar 01, 2002 at 15:45 UTC | |
by rjray (Chaplain) on Mar 01, 2002 at 22:05 UTC |