CURLOPT_HTTP_VERSION.md add note to history

This commit is contained in:
Viktor Szakats 2025-08-01 13:43:41 +02:00
parent 87d5b138aa
commit f387fd59d7
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -105,7 +105,7 @@ int main(void)
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_2TLS);
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
ret = curl_easy_perform(curl);
if(ret == CURLE_HTTP_RETURNED_ERROR) {
/* an HTTP response error problem */
@ -114,6 +114,11 @@ int main(void)
}
~~~
# HISTORY
CURL_HTTP_VERSION_\* enums became `long` types in 8.13.0, prior to this version
a `long` cast is necessary when passing to curl_easy_setopt(3).
# %AVAILABILITY%
# RETURN VALUE