Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curlopt_failonerror(3) [mojave man page]

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)
Man Page

8 More Discussions You Might Find Interesting

1. IP Networking

http error code

Hi, I'm looking for detailed http error codes. I want to know what means : HTTP/1.1" 302 330 and HTTP/1.1" 302 265 Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies

2. UNIX for Advanced & Expert Users

removing frame charecters

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)
Discussion started by: tkbharani
6 Replies

3. UNIX for Dummies Questions & Answers

AS/400

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)
Discussion started by: kunalpatil09
1 Replies

4. AIX

AS/400

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)
Discussion started by: kunalpatil09
0 Replies

5. UNIX for Dummies Questions & Answers

Understanding Groups

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)
Discussion started by: yoavbe
2 Replies

6. UNIX for Dummies Questions & Answers

Printing the lines using search patterns

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)
Discussion started by: sudharson
4 Replies

7. Shell Programming and Scripting

Using Wget with Digest Authentication

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)
Discussion started by: mtarkowski
5 Replies

8. Shell Programming and Scripting

awk script to find time difference between HTTP PUT and HTTP DELETE requests in access.log

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)
Discussion started by: Juha
3 Replies