Above code constantly gives me failure. If I try the 'html form' provided and submit via browser, it works fine.#!/perl/bin/perl use HTTP::Request::Common qw(POST); use LWP::UserAgent; my $ua = new LWP::UserAgent; my $req = POST 'http://someprivatesite.com/getfile.cgi', [ "./some.xml",'xml_file','Content-type' => 'multipart/form-data' +]; my $res = $ua->request($req); print $res->as_string;
Thanks for your help
In reply to Uploading a file via LWP by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |