GNURLOPT_K...G_ON_ERROR(3)
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
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms