How do you set the content type of an HTTP Request?
I\'ve tried this:
$headers[\'Accept\'] = \'application/xml\';
$headers[\'Content-Type\'] = \'appl
I believe the headers must be a plain array whose elements are full key:value headers, not an associative array:
$headers = array();
$headers[] = 'Accept: application/xml';
$headers[] = 'Content-Type: application/xml';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
This is specified in the curl_setopt() documentation.