in reply to Re^2: Using CURL
in thread Using CURL
#!/usr/bin/perl -T use strict; use diagnostics; use LWP::UserAgent; my $req = HTTP::Request->new( POST => 'http://example.com/webservice', # method and URI ); $req->content_type('application/xml'); $req->content('<hello>world!</hello>'); my $ua = LWP::UserAgent->new; $ua->timeout(5); my $res = $ua->request($req); print $res->content if $res->is_success;
|
|---|