[ $_[1]->reason || $_[1]->filename ],
]
},
+ sub (POST + %* + %biff=) {
+ $_[1]->{bar} ||= 'EMPTY';
+ [ 200,
+ [ "Content-type" => "text/plain" ],
+ [ join(' ',@{$_[1]}{qw(biff bong)}) ]
+ ]
+ },
}
}
is($upload->content, 'FOO BAR', 'both params returned');
+my $upload_splat = run_request(
+ POST 'http://localhost'
+ => Content_Type => 'form-data'
+ => Content => [
+ biff => 'frew',
+ bong => 'fru'
+ ]
+);
+
+cmp_ok($upload_splat->code, '==', 200, '200 with multipart');
+
+is($upload_splat->content, 'frew fru', 'both params returned');
+
my $upload_wrongtype = run_request(
POST 'http://localhost'
=> [ baz => 'fleem' ]