On Tue, Aug 10, 2010 at 07:38:33AM +0100, me said: > I want to POST multiple files to an API endpoint.
Once again proving that debugging to teddy^W mailing list works ... Instead of $req = POST($url, Content_Type => 'form-data', Content => [%opts]); I had to do my @content; foreach my $key (keys %opts) { my $value = $opts{$key}; $value = [$value] unless ref($value); foreach my $v (@$value) { $v = [$v] if $is_file_param{$key}; push @content, ($key, $v); } } $req = POST($url, Content_Type => 'form-data', Content => \...@content); et viola - it all worked.