title: Why does a PUT request require x-www-form-urlencoded and not work with form-data?
body: <p>I'm trying to retrieve the data from a PUT request.</p>
  
  <p>Currently I have it working with the below code:</p>
  
  <pre><code>parse_str(file_get_contents("php://input"), $parsedArray);
  </code></pre>
  
  <p>But this seems to only be supported with x-www-url-encoded and not the standard form-data, is there a work around that I've missed?</p>
  
  <p>If it's any addition I have the following headers set on all requests to my API:</p>
  
  <pre><code>header("Access-Control-Allow-Origin: *");
  header("Access-Control-Allow-Methods: *");
  header("Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, DELETE");
  header("Access-Control-Allow-Headers: Authorization");
  header("Content-Type: application/json");
  </code></pre>
  
  <p>If more info is needed i can provide it, not too sure what else could be effecting this?</p>
  
  <p>Cheers in advance,
  Jamie</p>