kb2yht has asked for the wisdom of the Perl Monks concerning the following question:
my $forms_agent = LWP::UserAgent->new(); $forms_agent->from('nolan@foo.bar'); $forms_agent->timeout(62); my $cjar = HTTP::Cookies->new(); my $content = "SNumber=$_[0]\nDataAction=Submit"; my $saf_url = URI::URL->new(); $saf_url->base("http://192.168.1.1/safety/"); $saf_url->path("UpdateAction.asp"); $saf_url->query("DataAction=Submit&SNumber=$_[0]"); my $head = HTTP::Headers->new( Accept=>'text/html' ); $head->referer('UpdateForm.asp'); $head->date(time); my $saf_request = HTTP::Request->new(POST=>$saf_url,$head,$con +tent); my $answer = $forms_agent->request($saf_request); $cjar->extract_cookies($answer); $saf_url->path($answer->header("location")); $saf_url->query(''); $saf_request = HTTP::Request->new( POST=>$saf_url,$head); $cjar->add_cookie_header($saf_request); $answer = $forms_agent->request($saf_request);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ASP, and HTTP::Request POST
by nardo (Friar) on May 29, 2001 at 10:07 UTC | |
by Beatnik (Parson) on May 29, 2001 at 13:51 UTC |