Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 surveying the Monastery: (13)
As of 2014-10-01 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (31 votes), past polls