GNURLOPT_K...G_ON_ERROR(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

okay bestie πŸ’– welcome to the curl_easy_setopt options manual β€” this page is GNURLOPT_K...G_ON_ERROR(3), and she is all about CURLOPT_KEEP_SENDING_ON_ERROR. no cap.

🌸 NAME 🌸

CURLOPT_KEEP_SENDING_ON_ERROR β€” keep sending on early HTTP response >= 300.

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEEP_SENDING_ON_ERROR,
                          long keep_sending);

πŸ’… DESCRIPTION πŸ’…

So here's the vibe: a long parameter set to 1 tells the library to keep sending the request body if the HTTP code returned is equal to or larger than 300. The default action would be to stop sending and close the stream or connection. 😭

This option is suitable for manual NTLM authentication, i.e. if an application does not use CURLOPT_HTTPAUTH(3), but instead sets "Authorization: NTLM ..." headers manually using CURLOPT_HTTPHEADER(3). iykyk.

Most applications do not need this option. fr fr β€” she's a niche little icon.

πŸŽ€ DEFAULT πŸŽ€

0, stop sending on error.

πŸ¦‹ PROTOCOLS πŸ¦‹

HTTP. that's it, that's the protocol, periodt.

🌈 EXAMPLE 🌈

CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "sending data");
  curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, 1L);
  ret = curl_easy_perform(curl);
}

⭐ AVAILABILITY ⭐

Along with HTTP. Added in 7.51.0.

πŸ”₯ RETURN VALUE πŸ”₯

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

πŸ’œ SEE ALSO πŸ’œ


made with πŸ’– from libcurl 7.51.0, dated 22 Sep 2016, and this page is GNURLOPT_K...G_ON_ERROR(3). slay.

πŸ“¦ where this page comes from