Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Syntax problem LWP Post hash

by twotone (Beadle)
on Jun 03, 2009 at 18:22 UTC ( #768107=note: print w/ replies, xml ) Need Help??


in reply to Syntax problem LWP Post hash

Here's how I do it:

use strict; use LWP::UserAgent; my $url = 'http://foobar.com'; my %postdata = (key => 'value', key2 => 'value2'); my $ua = LWP::UserAgent->new; my $response = $ua->post($authorize_url,[%postdata]); if ($response->is_success) { print $response->content; } else { print "Post Failed!\n"; }


Comment on Re: Syntax problem LWP Post hash
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://768107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2015-07-28 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls