I am sending a request to a php server with a XML in the content:
POST /index3.php HTTP/1.0
Connection: Close
Accept: application/xml
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<root />
I've checked in globals vars (like $_GET
, $_POST
, $_ENV
, $_FILES
, $_REQUEST
...) but they are all empty.
How could I retrieve the content in the server?
Accept
header "... can be used to specify certain media types which are acceptable for the response." Are you saying here that you desire PHP to respond with XML? "... If no Accept header field is present, then it is assumed that the client accepts all media types. If an Accept header field is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server SHOULD send a 406 (not acceptable) response." w3.org/Protocols/rfc2616/rfc2616-sec14.html – Anthony RutledgeAccept
header, I might suggest sending the HTTPContent-Length
header. – Anthony Rutledge