screamingeagle has asked for the wisdom of the Perl Monks concerning the following question:
my $ua = LWP::UserAgent->new; my $remote_server = "100.100.100.100/ReceivingPage.asp?username= +test&password=pwd"; my $req = HTTP::Request->new(GET=>"http://$remote_server"); my $res = $ua->request($req); if ($res->is_success) { $req = HTTP::Request->new(POST=>"http://$remote_server"); + + $req->content_type('application/x-www-form-urlencoded'); my $postvars = $request_xml; $req->content_length(length($postvars)); $req->content($postvars); $res = $ua->request($req); if ($res->is_success) { my $xml_raw = $res->content; my $parsed = eval {XMLin($xml_raw) }; ...
Edit ar0n -- added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: POSTing QueryString data using LWP::UserAgent
by Hero Zzyzzx (Curate) on Jan 08, 2002 at 06:34 UTC | |
by screamingeagle (Curate) on Jan 08, 2002 at 06:54 UTC | |
|
Re: POSTing QueryString data using LWP::UserAgent
by gav^ (Curate) on Jan 08, 2002 at 09:14 UTC | |
by IlyaM (Parson) on Jan 08, 2002 at 18:59 UTC | |
by screamingeagle (Curate) on Jan 09, 2002 at 07:13 UTC | |
by screamingeagle (Curate) on Jan 10, 2002 at 13:23 UTC |