in reply to Re: LWP, extract_cookies, etc.
in thread LWP, extract_cookies, etc.
#!/usr/lib/perl -w use strict; use LWP::UserAgent; use HTTP::Request::Common; # didn't work without this use statement use HTTP::Cookies; my $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new(file => 'cookie_jar', autosave =>1) +); $ua->request(POST "http://www.sitedomain.com/login.cfm", { username =>'abcuser', userpass =>'abc123', submit =>'Submit' }); my $request = $ua->request(POST "http://www.sitedomain.com/editinfopag +e.cfm", { firstname =>"MyName", lastname =>"MyLastName", company =>"companyname", address =>"111 East 222 South", city =>"Provo", state =>"UT", zip =>"99999" }); print $request->is_success ? "worked\n" : "failed\n"; # this shows me that I have the following error: # HTTP/1.1 302 (Found) Object Moved... print $request->as_string;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTTP 302 error now??
by IlyaM (Parson) on May 22, 2002 at 16:10 UTC | |
by inblosam (Monk) on May 22, 2002 at 20:16 UTC | |
by IlyaM (Parson) on May 22, 2002 at 21:07 UTC | |
by inblosam (Monk) on May 23, 2002 at 04:47 UTC | |
by inblosam (Monk) on May 23, 2002 at 06:15 UTC | |
|