Making put request in php curl
<p>I know many people have already asked this question but unfortunately that answers doesn't help me.</p>

<p>I am trying a put request to the rest api using curl so for i am making my curl request like </p>

<pre><code>  $GLOBAL_REST_URL = $GLOBAL_REST_URL.$meetinID;
   $json = array2json($ages);
   print $json;
   $curl_handle=curl_init();
   curl_setopt($curl_handle,CURLOPT_URL,$GLOBAL_REST_URL);
   curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,20);

   curl_setopt($curl_handle, CURLOPT_PUT, 1);

   curl_setopt($curl_handle, CURLOPT_INFILE, $json);




  // curl_setopt($curl_handle, CURLOPT_POSTFIELDS,$json);
   curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $headers);
   curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
   $buffer = curl_exec($curl_handle);
   curl_close($curl_handle);
   $getit =  json_decode($buffer, true); 
</code></pre>

<p>$json is the request body and $GLOBAL_REST_URL  is the RESTurl </p>

<p>The body and url that i am passing here is working fine when i am using it on mozila rest client but in programming i am getting error that body is not define .. </p>

<p>Help Plz .....?</p>
