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. Advertisements

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,840
    Andrew Thompson
    Oct 29, 2004
  2. Arthur Marinis via .NET 247

    Calling a webservice in Dotnet using HTTP-POST and input mime type

    Arthur Marinis via .NET 247, Aug 30, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    385
    Arthur Marinis via .NET 247
    Aug 30, 2004
  3. Jan Arickx
    Replies:
    0
    Views:
    350
    Jan Arickx
    Aug 25, 2003
  4. Rubel Kanubel

    Post radiobuttons (forms) using lwp-useragent

    Rubel Kanubel, Oct 12, 2003, in forum: Perl Misc
    Replies:
    5
    Views:
    404
    Anno Siegel
    Oct 13, 2003
  5. Andrew
    Replies:
    1
    Views:
    586
    Gunnar Hjalmarsson
    Dec 5, 2003
  6. joe
    Replies:
    0
    Views:
    358
  7. Zapanaz
    Replies:
    4
    Views:
    234
    Tad McClellan
    Oct 12, 2005
  8. ecureuil
    Replies:
    0
    Views:
    587
    ecureuil
    May 28, 2006
Loading...