FireBird34 has asked for the wisdom of the Perl Monks concerning the following question:
$loginResponse->content gives me the HTML output as if I wasn't logged in yetmy $browser = LWP::UserAgent->new; my $loginUrl = 'http://forum.webpage.com/index.php'; #my login credentials my $loginResponse = $browser->post ($loginUrl, [ 'action' => 'login', 'username' => 'my use +rname', 'password' => 'my pas +sword' ] ); die "$loginUrl error: ", $loginResponse->status_line unless $loginResponse->is_success; die "Weird content type at $loginUrl -- ", $loginResponse->content_typ +e unless $loginResponse->content_type eq 'text/html'; print "First resp: ".$loginResponse->content."\n"; # ban user my $banUrl = 'http://forum.webpage/mod/ban.php'; my $banResponse = $browser->post ($banUrl, 'banUser' => "username here +" ); die "$banUrl error: ", $banResponse->status_line unless $banResponse->is_success; die "Weird content type at $banUrl -- ", $banResponse->content_type unless $banResponse->content_type eq 'text/html'; print "Second resp: ".$banResponse->content."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: app not storing cookies (using LWP::UserAgent)
by CSJewell (Beadle) on Apr 16, 2009 at 14:44 UTC | |
by Anonymous Monk on Apr 16, 2009 at 20:20 UTC | |
by FireBird34 (Pilgrim) on Apr 17, 2009 at 16:17 UTC |