"petersm" <[EMAIL PROTECTED]> writes:

> I am new to LWP and WWW::Mech and have used them on a couple of
> projects. I was wondering what is the best way to do a multipart
> post (file upload) using LWP.

>From LWP you just do a post with something like:

  $ua->post('http://www.example.com',
            content_type => 'form-data',
            content => [
               foo => 1,
               file => ["foo.txt"],
            ]);

More details available by reading the HTTP::Request::Common manpage.

Regards,
Gisle

Reply via email to