POST MIME Content using LWP

P

prakash

Hi,

I got a MIME data that is divided into 3 parts depending on the content
separated by boundary. The MIME content looks like this:


Content-type: multipart/form-data; boundary=LINE
Content-length: 120

--LINE
Content-Disposition: form-data; name="authenticate"
<----- XML Content having authentication information ----->

--LINE
Content-Disposition: form-data; name="service"
<----- XML Content having service requested ------->

--LINE
Content-Disposition: form-data; name="data"
<---- Text data required for the request to be serviced ----->

--LINE--


I have a request is to post the above MIME to a server using HTTP. My
question is
Is it possible to use LWP for this purpose as

use LWP;
my browser = LWP::UserAgent->new();
$resp = $browser->post(url, \@form_data,
Header1 => Value1, Header2 => Value2,. );

Normally post method accepts form data in parameter/value pair, so in
my case if I want to post the entire MIME content as above instead of
parameter /value pair, how can I do it?

Any help would be highly appreciated.

Thanks,
Prakash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

form post URL encoded 4
LWP and 302 redirects 2
lwp POST and proxies 4
LWP Post 2
can LWP handle this? 7
How do I PUSH an HTTP::POST using perl LWP? 2
Help with POST request using LWP? 2
Lwp Post Problem 2

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top