Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Question: Send a chunk of XML to a server

by lihao (Monk)
on Nov 09, 2009 at 18:06 UTC ( [id://805976]=note: print w/replies, xml ) Need Help??


in reply to Re: Question: Send a chunk of XML to a server
in thread Question: Send a chunk of XML to a server

But I can not change the server-side code which was written in PHP by other developers, and they wanted me to send exactly that XML data to the server. sounds to me that it can not be handled by a form POST.
  • Comment on Re^2: Question: Send a chunk of XML to a server

Replies are listed 'Best First'.
Re^3: Question: Send a chunk of XML to a server
by ikegami (Patriarch) on Nov 09, 2009 at 19:11 UTC

    I was trying to save you some trouble writing the server. Since that's already done, just use

    my $response = $ua->post( 'http://...', Content_Type => 'application/xml', Content => $xml, );
    Or if you need to twiddle with the request object,
    use HTTP::Common::Request qw( POST ); my $request = POST( "http://...", Content_Type => 'application/xml', Content => $xml, ); my $response = $ua->request($request);

    sounds to me that it can not be handled by a form POST.

    Of course you can't avoid using a form by using a form. I fail to see your point.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://805976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-20 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found