You should be able to use LWP et all, or HTTP::Body
#!/usr/bin/perl -- use strict; use warnings; use LWP; use HTTP::Request::Common qw/ POST /; use Encode ; my $url = q[http://localhost/]; my $req = POST( $url, Content_Type => 'multipart/form-data', Content => [ fileuploadfieldname => [ undef, # filename_to_read encode("UTF-8", qq'stupid \x{8216}smart\x{8217} and "quoted" filename. +txt'), -content => 'stupid content' ], ], ); dd( $req = $req->as_string ); { $req = HTTP::Request->parse ( $req ); $req = HTTP::Response->new(200, "OK", $req->headers, $req->content + ); $req = HTTP::Response->parse( $req->as_string ); $req = HTTP::Response->new(200, "OK", $req->parts ->headers ); dd( $req ); } dd( $req->filename ); sub dd { use Data::Dumper; print Data::Dumper->new([@_])->Useqq(1)->Dump, "\n"; } __END__ $VAR1 = "POST http://localhost/\nContent-Length: 169\nContent-Type: mu +ltipart/form-data; boundary=xYzZY\n\n--xYzZY\r\nContent-Disposition: +form-data; name=\"fileuploadfieldname\"; filename=\"stupid \350\210\2 +26smart\350\210\227 and \\\"quoted\\\" filename.txt\"\r\n-Content: st +upid content\r\n\r\n\r\n--xYzZY--\r\n"; $VAR1 = bless( { "_content" => "", "_rc" => 200, "_headers" => bless( { "content-disposition" => "form +-data; name=\"fileuploadfieldname\"; filename=\"stupid \350\210\226sm +art\350\210\227 and \\\"quoted\\\" filename.txt\"", "-content" => "stupid content" }, 'HTTP::Headers' ), "_msg" => "OK" }, 'HTTP::Response' ); $VAR1 = "stupid \350\210\226smart\350\210\227 and \"quoted\" filename. +txt";
update: ok, so i ddg://"multipart/parallel" ddg://site:perlmonks.org "multipart/parallel" site:search.cpan.org "multipart/parallel" and I learn its http://tools.ietf.org/html/rfc1521, so look for RFC1521 on cpan, say MIME::Tools/mimeexplode or Email::MIME or MIME::Explode
In reply to Re: multipart/parallel Respons via LWP::UserAgent
by Anonymous Monk
in thread multipart/parallel Respons via LWP::UserAgent
by gjetter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |