Query: curlopt_failonerror
OS: mojave
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
CURLOPT_FAILONERROR(3) curl_easy_setopt options CURLOPT_FAILONERROR(3)NAMECURLOPT_FAILONERROR - request failure on HTTP response >= 400SYNOPSIS#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FAILONERROR, long fail);DESCRIPTIONA long parameter set to 1 tells the library to fail the request if the HTTP code returned is equal to or larger than 400. The default action would be to return the page normally, ignoring that code. This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407). You might get some amounts of headers transferred before this situation is detected, like when a "100-continue" is received as a response to a POST/PUT and a 401 or 407 is received immediately afterwards. When this option is used and an error is detected, it will cause the connection to get closed.DEFAULT0, do not fail on errorPROTOCOLSHTTPEXAMPLETODOAVAILABILITYAlong with HTTPRETURN VALUEReturns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.SEE ALSOCURLOPT_HTTP200ALIASES(3), CURLOPT_KEEP_SENDING_ON_ERROR(3), libcurl 7.54.0 September 22, 2016 CURLOPT_FAILONERROR(3)
Related Man Pages |
---|
curlinfo_response_code(3) - mojave |
curlopt_maxredirs(3) - mojave |
curlopt_postfieldsize(3) - mojave |
curlopt_suppress_connect_headers(3) - mojave |
curlopt_httpget(3) - mojave |
Similar Topics in the Unix Linux Community |
---|
http error code |
AS/400 |
Printing the lines using search patterns |
Using Wget with Digest Authentication |
awk script to find time difference between HTTP PUT and HTTP DELETE requests in access.log |