in reply to Re: File upload with LWP::UserAgent
in thread File upload with LWP::UserAgent
use HTTP::Cookies; use WWW::Mechanize; my $cj = HTTP::Cookies->new( autosave => 1, ignore_discard => 1 ); my $mech = WWW::Mechanize->new( cookie_jar => $cj ); $mech->get( 'http://example.com/login.action' ); if ($mech->success()) { $mech->submit_form( form_name => 'loginform', fields => { os_usern +ame => 'username', os_password => 'password' } ); } if ($mech->success()) { $mech->follow_link( text => 'Training'); # This is where I get red +irected to the login page again! }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: File upload with LWP::UserAgent
by PerlRob (Sexton) on Jun 13, 2008 at 03:30 UTC |