title: how can curl option CURLOPT_POSTFIELDS takes XML directly?
body: <p>I came accross a code which works but I find it difficult to understand its working  .Since post request are send in key-value pair but as you will see in this code CURLOPT_POSTFIELDS is directly assign to xml data . In which "key" does it get send to the host ??</p>
  
  <p>Is there any default key used when no key is specified for value ?</p>
  
  <p>Thanks below is the full code.</p>
  
  <pre><code>    $xml_file = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;AvailRateUpdateRQ xmlns="http://www.expediaconnect.com/EQC/AR/2007/02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  
  &lt;Authentication username="username" password="ECLPASS"/&gt;
  
  &lt;Hotel id="111"/&gt;
  
  &lt;DateRange from="2012-09-22" to="2012-09-26"/&gt;
  
  &lt;RoomType id="222"&gt;
  
  &lt;RatePlan id="333"&gt;
  
  &lt;Rate currency="USD"&gt;
  
  &lt;PerDay rate="100.00"/&gt;
  
  &lt;/Rate&gt;
  
  &lt;/RatePlan&gt;
  
  &lt;/RoomType&gt;
  
  &lt;/AvailRateUpdateRQ&gt;
  
  ';
      $host = 'host: expediaquickconnect.com';
  
  $accept = 'Accept: application/xml';
  
  $connection = 'Connection: Keep-Alive';
  
  $useragent = 'User-Agent: Mozila/4.0(compatible; MSIE 7.0; Windows NT 5.1; NET CLR 1.0.3705;.NETCLR 1.1.4322; InfoPath.1;.NETCLR 2.0.50727;.NETCLR 3.0.04506.30)';
  
  $acceptlanguage = 'Accept-Language: en-us';
  
  $acceptencoding = 'Accept-Encoding: gzip, deflate';
  
  $contenttype = 'Content-Type: application/xml';
  
  
  
  $header = array( $host, $accept, $useragent, $acceptlanguage, $acceptencoding, $contenttype );
  
  
  
  $session = curl_init( );
  
  curl_setopt($session, CURLOPT_URL, $post_url );
  
  curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);
  
  curl_setopt($session, CURLOPT_SSL_VERIFYPEER, 0);
  
  curl_setopt($session, CURLOPT_SSL_VERIFYHOST, 2);
  
  curl_setopt($session, CURLOPT_HTTPHEADER, $header);
  
  curl_setopt($session, CURLOPT_HEADER, FALSE);
  
  curl_setopt($session, CURLOPT_POST, 1);
  
  curl_setopt($session, CURLOPT_POSTFIELDS, $xml_file);  // how  ??
  
  curl_setopt($session, CURLOPT_HTTPGET, FALSE);
  
  curl_setopt($session, CURLOPT_COOKIESESSION, FALSE);
  
  
  
  $response = curl_exec ($session);
  
  curl_close ($session);
  </code></pre>