Try using just Content_Type => 'form-data' or Content_Type => 'multipart/form-data; boundary="xYzZY"'
poj#!/usr/bin/perl use strict; use warnings; use MIME::Base64; use HTTP::Request::Common; my $file = "/tmp/test_image.tgz.bin"; my $url = "https://10.248.179.31/api/rest/software_package"; my $request = HTTP::Request::Common::POST( $url, Authorization => 'Basic ' . encode_base64('user:password'), Content_Type => 'multipart/form-data; boundary="xYzZY"', Content => [ file => [$file] ], ); print $request->as_string;
In reply to Re: LWP::Useragent - File Upload
by poj
in thread LWP::Useragent - File Upload
by leefp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |