curl_easy_setopt
This function is used to tell libcurl how to behave. By setting the appropriate options, the application can change libcurl's behavior. All options are set with an option followed by a parameter. That parameter can be a long, a function pointer, an object pointer or a curl_off_t, depending on what the specific option expects. Read this manual carefully as bad input values may cause libcurl to behave badly! You can only set one option in each function call. A typical application uses many curl_easy_setopt calls in the setup phase. Options set with this function call are valid for all forthcoming transfers performed using this handle. The options are not in any way reset between transfers, so if you want subsequent transfers with different options, you must change them between the transfers. You can optionally reset all options back to internal default with curl_easy_reset. see also https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
Syntax
Usage
| handle | Curl handle |
| option | Necessary option (see CURLoption enum) |
Return
If — the operation was successful, CURLE_OK is returned. Otherwise an appropriate error code will be returned.
Errors
If passed curl handle is not a valid or or undefined option