Del via


Networking_Curl_SetDefaultProxy Function

Header: #include <applibs/networking_curl.h>

Applies the proxy settings on the cURL handle.

  int Networking_Curl_SetDefaultProxy(CURL *curl_handle);

Parameters

  • curl_handle pointer to the cURL handle.

Errors

If an error is encountered, returns -1 and sets errno to the error value.

  • EACCES: The calling application doesn't have the NetworkConfig or the ReadNetworkProxyConfig capability.

  • EFAULT: The curl_handle parameter is NULL.

Any other errno may also be specified; such errors aren't deterministic and there's no guarantee that the same behavior will be retained through system updates.

Returns

0 for success, or -1 for failure, in which case errno will be set to the error value.

Remarks

The application manifest must include the NetworkConfig or ReadNetworkProxyConfig capability.

Concepts and samples

Samples: HTTPS_Curl_Easy and HTTPS_Curl_Multi

Application manifest requirements

Requires the NetworkConfig or the ReadNetworkProxyConfig capability.