title: Parse JSON from GET response when headers are present
body: <p>I am trying to <a href="http://php.net/manual/en/function.json-decode.php" rel="nofollow">json_decode</a> the response I receive from a GET request to my server-side API but I am getting an empty string back. Would I be right in assuming that because the response contains all the header info that the JSON decoder cant cope? This is the full response I'm getting from my server:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Server: nginx/1.0.5
  Date: Sun, 18 Mar 2012 19:44:43 GMT
  Content-Type: application/json
  Connection: keep-alive
  Vary: Accept-Encoding
  X-Powered-By: Servlet/3.0; JBossAS-6
  Content-Length: 97
  
  {"pid":"162000798ab8481eaeb2b867e10f8849","uuid":"973b8722c75a4cacb9fd2316517587bb"}
  </code></pre>
  
  <p>Do I need to remove the headers in my servlet before I send the response to the client?</p>