POST MIME Content using LWP

Discussion in 'Perl Misc' started by prakash, Oct 26, 2005.

  1. prakash

    prakash Guest

    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
    prakash, Oct 26, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJ
    Replies:
    1
    Views:
    1,566
    Andrew Thompson
    Oct 29, 2004
  2. Jan Arickx
    Replies:
    0
    Views:
    194
    Jan Arickx
    Aug 25, 2003
  3. joe
    Replies:
    0
    Views:
    189
  4. Zapanaz
    Replies:
    4
    Views:
    130
    Tad McClellan
    Oct 12, 2005
  5. ecureuil
    Replies:
    0
    Views:
    323
    ecureuil
    May 28, 2006
Loading...

Share This Page