title: How to switch from POST to GET in PHP CURL
body: <p>I have tried switching from a previous Post request to a Get request. Which assumes its a Get but eventually does a post.</p>
  
  <p>I tried the following in PHP :</p>
  
  <pre><code>curl_setopt($curl_handle, CURLOPT_POSTFIELDS, null);
  curl_setopt($curl_handle, CURLOPT_POST, FALSE);
  curl_setopt($curl_handle, CURLOPT_HTTPGET, TRUE);
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>Additional information:
  I already have a connection that's setup to do a POST request. That completes successfully but later on when I try to reuse the connection and switch back to GET using the setopts above it still ends up doing a POST internally with incomplete POST headers. The problem is it believes its doing a GET but ends up putting a POST header without the content-length parameter and the connection fails witha 411 ERROR.</p>