I\'m able to run the following curl command (at the command line) successfully:
curl -XPOST --basic -u user:password -H accept:application/json -H Content-ty
All all that needs to be set is the custom request to reuse post method.
CURLOPT_URL=>$url, CURLOPT_CUSTOMREQUEST=>'PUT', CURLOPT_POSTFIELDS=>$params,