1) Is there any method to check if CURLOPT field of a curl handle is set and if so then what its value?
Reason - I'm writing a class that should recognize if CURLOPT_POST is set. If not then dedicated method will add to url query in GET syntax to perform GET request.
2) Second reason is to read for debug all CURL parameter fields of handle that curl_exec had a problem to execute and returned an error
3) confirmation of successfully changed CURLOPT field of handle, assuming it is possible to change a field that was set before (is it?)
Asked
Active
Viewed 177 times
0

Jimmix
- 5,644
- 6
- 44
- 71
1 Answers
1
For 1), this answer should help you
For 2) you'd better use curl_error to get cURL errors
For 3), curl_setopt will overwrite previously defined options. It returns true
on success and false
otherwise.

Community
- 1
- 1

Alain Tiemblo
- 36,099
- 17
- 121
- 153
-
1`curl_getinfo` doesn't work that way... – dev-null-dweller May 04 '13 at 18:50