CURLOPT_POSTREDIR.md drop cast, add note to history

This commit is contained in:
Viktor Szakats 2025-08-01 13:06:54 +02:00
parent bec0aef775
commit 7c20857793
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -64,8 +64,8 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data=true");
/* example.com is redirected, so we tell libcurl to send POST on 301,
302 and 303 HTTP response codes */
curl_easy_setopt(curl, CURLOPT_POSTREDIR, (long)CURL_REDIR_POST_ALL);
302 and 303 HTTP response codes. */
curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
curl_easy_perform(curl);
}
@ -77,6 +77,9 @@ int main(void)
This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the
301 then. CURL_REDIR_POST_303 was added in 7.26.0.
CURL_REDIR_\* macros 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