in reply to File upload with LWP::UserAgent
would be correct, POST() creates HTTP::Request Object, making a HTTP::Request Object out of a HTTP::Request Object is nonsense.... my $userAgent = LWP::UserAgent->new(); my $request = POST 'http://example.com', Content_Type => 'multipart/fo +rm-data', Content => [file_0 => ['options2.txt']]; $request->authorization_basic('username', 'password'); my $response = $userAgent->request($request); print $response->error_as_HTML . "\n" if $response->is_error;
|
|---|