Re: Best way to post XML via curl?

From: Date: Thu, 12 Feb 2009 01:04:38 +0000
Subject: Re: Best way to post XML via curl?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-288136@lists.php.net to get a copy of this message
This line is the key. WITH the line, I get a properly formatted XML response from the server, telling me that I did not send any valid post fields. WITHOUT the line, all I get back from the server is a '1' and their tech reports that no valid call was received from me. On Feb 11, 2009, at 4:56 PM, Stuart wrote:
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml"));
Drop the above line and I reckon it should work. The content you're sending is not XML, it's form fields which CURL will default to. It just happens that one of those fields is XML.


« previous php.general (#288136) next »