donfreenut has asked for the wisdom of the Perl Monks concerning the following question:
# build POST request my $req = HTTP::Request->new('POST', $postURL); # $postURL is "http:/ +/everything2.org/index.pl" $req->content_type('application/x-www-form-urlencoded'); $req->content($postData); # $postData is "op=login&username=FOO&passw +ord=BAR" or somesuch # get the page my $response = $ua->request($req); if ($response->is_success) { # extract the cookie from the response and return the HTTP::Cookie +s object $loginCookieJar->extract_cookies($response); $loginCookieJar; } else { die "Could not log in.\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bug in HTTP::Cookies?
by boo_radley (Parson) on Jan 30, 2001 at 21:23 UTC | |
|
Re: Bug in HTTP::Cookies?
by damian1301 (Curate) on Jan 30, 2001 at 21:07 UTC |