title: PHP HTTP header REST
body: <p>I am developing an UI for a REST repository using PHP and the PEAR HTTP REQUEST package (http://pear.php.net/package/HTTP_Request/).
  I created a HTTP GET request and it delivers the requested rdf/xml file as expected. But I want to extend this request and I can't get this working.
  The repository allows sending zip files which are attached to an id. So I have to call the same URL which delivers the rdf/xml data, but I have to change the HTTP GET header from xml to accept: application/zip, before executing my request. This should deliver the zip instead of the rdf/xml file.</p>
  
  <pre><code>$req =&amp; new HTTP_Request();
  $req-&gt;setMethod(HTTP_REQUEST_METHOD_GET);
  $req-&gt;setURL($url);
  $req-&gt;clearPostData();
  if (!PEAR::isError($req-&gt;sendRequest())) {
       $response2 = $req-&gt;getResponseBody();
  } else {
       $response2 = "";
  }
  
  echo $response2;
  </code></pre>
  
  <p>Does anyone know how to modify the GET call to get this done? I really need help!</p>
  
  <p>Furthermore I want to create a HTTP PUT request which uses multipart/form-data. Does anyone know how to make this?</p>
  
  <p>Please help me! Thanks!</p>