mirror of
https://github.com/curl/curl.git
synced 2026-06-08 12:24:17 +03:00
CURLOPT_POSTREDIR.md drop cast, add note to history
This commit is contained in:
parent
bec0aef775
commit
7c20857793
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue