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"; }
|
|---|