1CURLOPT_KEEP_SENDING_ON_ERROcRu(r3l)_easy_setopt optCiUoRnLsOPT_KEEP_SENDING_ON_ERROR(3)
2
3
4

NAME

6       CURLOPT_KEEP_SENDING_ON_ERROR  - keep sending on early HTTP response >=
7       300
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEEP_SENDING_ON_ERROR,
13                                 long keep_sending);
14

DESCRIPTION

16       A long parameter set to 1 tells the library to keep sending the request
17       body  if the HTTP code returned is equal to or larger than 300. The de‐
18       fault action would be to stop sending and close the stream  or  connec‐
19       tion.
20
21       This  option is suitable for manual NTLM authentication, i.e. if an ap‐
22       plication does not use CURLOPT_HTTPAUTH(3), but  instead  sets  "Autho‐
23       rization: NTLM ..."  headers manually using CURLOPT_HTTPHEADER(3).
24
25       Most applications do not need this option.
26

DEFAULT

28       0, stop sending on error
29

PROTOCOLS

31       HTTP
32

EXAMPLE

34       CURL *curl = curl_easy_init();
35       if(curl) {
36         CURLcode ret;
37         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
38         curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "sending data");
39         curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, 1L);
40         ret = curl_easy_perform(curl);
41       }
42

AVAILABILITY

44       Along with HTTP. Added in 7.51.0.
45

RETURN VALUE

47       Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
48

SEE ALSO

50       CURLOPT_FAILONERROR(3), CURLOPT_HTTPHEADER(3),
51
52
53
54libcurl 7.85.0                   May 17, 2022 CURLOPT_KEEP_SENDING_ON_ERROR(3)
Impressum