CURLOPT_PROXYTYPE.md drop cast, add note to history

This commit is contained in:
Viktor Szakats 2025-08-01 13:11:28 +02:00
parent bee5b178bc
commit 1530bd2b5b
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -85,13 +85,18 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "local.example.com:1080");
/* set the proxy type */
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS5);
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~
# HISTORY
CURLPROXY_\* enums became `long` types in 8.16.0, prior to this version
a `long` cast is necessary when passing to curl_easy_setopt(3).
# %AVAILABILITY%
# RETURN VALUE