Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: xml request

by rjray (Chaplain)
on Aug 04, 2002 at 23:15 UTC ( [id://187548]=note: print w/replies, xml ) Need Help??


in reply to xml request

The POST short-cut provided by HTTP::Request::Common expects to encode a list of parameters as a content-type of application/x-www-form-urlencoded. This isn't what you want to have done, so you can't use HTTP::Request::Common in this case.

Look at HTTP::Request instead, and create a request as such:

my $request = HTTP::Request->new(POST => $url); $request->content($xml);

Then you can pass $request as the parameter to the $ua->request() method.

--rjray

Replies are listed 'Best First'.
Re: Re: xml request
by patiafrica (Initiate) on Aug 05, 2002 at 09:44 UTC
    Dear monk, this is all really weired, here part of the code and then the response CODE:

    $ua = LWP::UserAgent->new; my $request = HTTP::Request->new(POST => $url); $request->content($xml_req); $response = $ua->request($request);
    RESPONSE from Server:

    HTTP/1.1 500 Internal Server Error Connection: close Date: Mon, 05 Aug 2002 09:40:10 GMT Server: Apache/1.3.22 (Unix) mod_jk mod_ssl/2.8.5 OpenSSL/0.9.6c Content-Type: text/html; charset=iso-8859-1 Client-Date: Mon, 05 Aug 2002 09:40:10 GMT Client-Peer: ip number Title: 500 Internal Server Error <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>500 Internal Server Error</TITLE> </HEAD><BODY>

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    </BODY></HTML>

      This means that the server you contacted had a critical failure at some juncture. Unfortunately, without knowing anything about the server, we'll be hard-pressed to offer any further advice.

      --rjray

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-28 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found