tbbatccc has asked for the wisdom of the Perl Monks concerning the following question:
#!/ActivePerl-.10/bin/perl use LWP 5.69; use HTTP::Request::Common qw( POST ); use HTTP::Headers; use HTTP::Response; my $submit_values = { #name/value pairs here + }; + + my $headers = HTTP::Headers->new( + 'Timeout' => '30', + ); + my @headers = ( + 'Timeout','30', + ); + my $ua = LWP::UserAgent->new( protocols_allowed => ['https'] ); + my $r = POST( 'https://someserver.com',@headers,$submit_values); + my $myresponse = $ua->request( $r ); $apiresponse = $myresponse->content ; print $apiresponse; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP: POST with headers
by shmem (Chancellor) on Jun 04, 2009 at 00:05 UTC | |
by tbbatccc (Initiate) on Jun 04, 2009 at 10:58 UTC | |
|
Re: LWP: POST with headers
by almut (Canon) on Jun 04, 2009 at 00:20 UTC | |
by tbbatccc (Initiate) on Jun 04, 2009 at 11:00 UTC |