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"; }
In reply to Re: Syntax problem LWP Post hash
by twotone
in thread Syntax problem LWP Post hash
by rethaew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |