Skip to content

Instantly share code, notes, and snippets.

@ken39arg
Created August 14, 2014 13:06
Show Gist options
  • Save ken39arg/58998c3d06e5d3898330 to your computer and use it in GitHub Desktop.
Save ken39arg/58998c3d06e5d3898330 to your computer and use it in GitHub Desktop.
### これはOK
local $HTTP::Request::Common::DYNAMIC_FILE_UPLOAD = 1;
my $uri = URI->new( 'https://exapmpe.com/post');
my $request = POST $uri,
Content_Type => 'multipart/form-data',
Content => [
file1 => [ 'file1.mp4' ],
file2 => [ 'file2.jpg' ],
param1 => 'abc',
param2 => '日本語',
param3 => 123,
];
### これはNG
local $HTTP::Request::Common::DYNAMIC_FILE_UPLOAD = 1;
my $uri = URI->new( 'https://exapmpe.com/post');
my $request = POST $uri,
Content_Type => 'multipart/form-data',
Content => [
param1 => 'abc',
param2 => '日本語',
param3 => 123,
file1 => [ 'file1.mp4' ],
file2 => [ 'file2.jpg' ],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment