title: Set HTTP Request "Content-Type"
body: <p>How do you set the content type of an HTTP Request?</p>
  
  <p>I've tried this:</p>
  
  <pre><code>$headers['Accept'] = 'application/xml';
  $headers['Content-Type'] = 'application/xml';
  
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  </code></pre>
  
  <p>And this is the result: </p>
  
  <pre><code>HTTP/1.1 200 OK
  Content-Encoding: gzip
  Content-Type: text/html;charset=UTF-8
  Date: Thu, 22 Mar 2012 14:04:36 GMT
  </code></pre>
  
  <p>but no luck so far...<br>
  What do I have to do to get an <code>Content-Type: application/xml</code> in my HTTP response?</p>