drop cast for CURL_HTTP_VERSION_2TLS in docs

This commit is contained in:
Viktor Szakats 2025-07-01 16:05:20 +02:00
parent f0e1b264a8
commit c4480abd0d
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -105,8 +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 */