CURLOPT_FAILONERROR(3) curl_easy_setopt options CURLOPT_FAILONERROR(3)NAME
CURLOPT_FAILONERROR - request failure on HTTP response >= 400
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FAILONERROR, long fail);
DESCRIPTION
A 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.
DEFAULT
0, do not fail on error
PROTOCOLS
HTTP
EXAMPLE
TODO
AVAILABILITY
Along with HTTP
RETURN VALUE
Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO CURLOPT_HTTP200ALIASES(3), CURLOPT_KEEP_SENDING_ON_ERROR(3),
libcurl 7.54.0 September 22, 2016 CURLOPT_FAILONERROR(3)
Check Out this Related Man Page
CURLOPT_POSTFIELDSIZE(3) curl_easy_setopt options CURLOPT_POSTFIELDSIZE(3)NAME
CURLOPT_POSTFIELDSIZE - size of POST data pointed to
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE, long size);
DESCRIPTION
If you want to post data to the server without having libcurl do a strlen() to measure the data size, this option must be used. When this
option is used you can post fully binary data, which otherwise is likely to fail. If this size is set to -1, the library will use strlen()
to get the size.
If you post more than 2GB, use CURLOPT_POSTFIELDSIZE_LARGE(3).
DEFAULT -1
PROTOCOLS
HTTP
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
const char *data = "data to send";
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* size of the POST data */
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) strlen(data));
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
curl_easy_perform(curl);
}
AVAILABILITY
Along with HTTP
RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO CURLOPT_POSTFIELDS(3), CURLOPT_POSTFIELDSIZE_LARGE(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_POSTFIELDSIZE(3)
Hi
I have a requirement as follows. My Input file is as follows.
COL1,COL2,COL3,COL4,COL5
987,2,3~7~5,400~468~598,0005~4687~5980
1111,2,2~7,400~468,0005~897
Expected OUTPUT
============
COL1,COL2,COL3,COL4,COL5
987,2,3,400,0005
987,2,7,468,4687
987,2,5,598,5980
1111,2,2,400,0005... (6 Replies)
Hi everybody,,,,
This is kunal here, I am very new to as/400 and recently started working on it in one of IT company....I am planning to have Certification exam of AS/400.
Can anybody please send me the links of different sites where I can have study material of AS/400 and also the details... (1 Reply)
Hi everybody,
I am learning AS/400 and working on it as a System Administrator.
Can anybody please suggest me the best blog site for AS/400....just like Unix.com for Linux / Unix administrator.
So that I can get all my answers related to AS/400...
thanks in advance,
kunal patil
:) (0 Replies)
Hi
cat /etc/group :
....
oinstall:x:401:
dba:x:400:oracle
...
cat /etc/passwd|grep oracle
oracle:x:130:401::/home/oracle:/bin/ksh
1. Is that mean that :
ORACLE user has OINSTALL as it Primary group and DBA as secondary group ?
2. What is the linux comman to set ORACLE user with... (2 Replies)
Hi all ,
i need an help here.!!!! i have a file that contains /etc/passwd files from some servers.
i need a script which search for presence of a user in the servers.
like if i give 51144 to the script. the should be o/p
Please help on this..... (4 Replies)
I’m trying to use wget 1.13.4 from a command line to access a web page using Digest Authentication on a Tomcat server, and I keep getting HTTP/1.1 401 Unauthorized response. Below is my code and the response. Any suggestions would be appreciated.
wget --debug --server-response --user-agent=""... (5 Replies)
Hi,
I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log.
Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)