I'm trying to view the actual request made by the curl_exec($curl) function. I am using the built in CURL functions in PHP.
When I do something like this -
curl = curl_init($url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
error_log(print_r($curl
I get a value of 1, which I assume is because it is a resource. I am looking to view the actual request being made, something like the following I would use via Terminal
$ curl https://z3nburmaglot.zendesk.com -u japeterson@zendes.com:password z3nburmaglot.zendesk.com/api/v2/users/25757394850.json -X PUT -v -H 'Content-type:application/json' -d '{"user": {"name": "James", "email": "japeterson@zendes.com"}}'
Is there anyway I can view the request the CURL resource is making like the above? This will help with debugging so I know if it is properly formatting the request and what is missing.