diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.md b/docs/libcurl/opts/CURLOPT_HTTPAUTH.md index 1146cab17e..78ba24397c 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPAUTH.md +++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.md @@ -137,7 +137,7 @@ int main(void) CURLcode ret; curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); /* allow whatever auth the server speaks */ - curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY); + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond"); ret = curl_easy_perform(curl); } @@ -152,6 +152,9 @@ CURLAUTH_ONLY was added in 7.21.3 CURLAUTH_NTLM_WB was added in 7.22.0 +CURLAUTH_\* macros became `long` types in 7.26.0, prior to this version +a `long` cast is necessary when passing to curl_easy_setopt(3). + CURLAUTH_BEARER was added in 7.61.0 CURLAUTH_AWS_SIGV4 was added in 7.74.0