.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
When setting \fICURLOPT_HTTPGET(3)\fP to 1, it will automatically set
\fICURLOPT_NOBODY(3)\fP to 0 and \fICURLOPT_UPLOAD(3)\fP to 0.
+
+Setting this option to zero has no effect. Applications need to explicitly
+select which HTTP request method to use, they cannot deselect a method. To
+reset a handle to default method, consider \fIcurl_easy_reset(3)\fP.
.SH DEFAULT
0
.SH PROTOCOLS
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
- /* use a GET to fetch this */
+ /* use a GET to fetch this */
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);
- /* Perform the request */
+ /* Perform the request */
curl_easy_perform(curl);
}
.fi
.SH RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
-.BR CURLOPT_NOBODY "(3), " CURLOPT_UPLOAD "(3), "
+.BR CURLOPT_NOBODY "(3), " CURLOPT_UPLOAD "(3), " CURLOPT_POST "(3), "
+.BR curl_easy_reset "(3) "
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
must specify the size in the request.
-When setting \fICURLOPT_POST(3)\fP to 1, it will automatically set
-\fICURLOPT_NOBODY(3)\fP to 0.
+When setting \fICURLOPT_POST(3)\fP to 1, libcurl will automatically set
+\fICURLOPT_NOBODY(3)\fP and \fICURLOPT_HTTPGET(3)\fP to 0.
If you issue a POST request and then want to make a HEAD or GET using the same
re-used handle, you must explicitly set the new request type using
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
You can use \fIcurl_easy_escape(3)\fP to url-encode your data, if necessary. It
returns a pointer to an encoded string that can be passed as \fIpostdata\fP.
-Using \fICURLOPT_POSTFIELDS(3)\fP implies \fICURLOPT_POST(3)\fP.
+Using \fICURLOPT_POSTFIELDS(3)\fP implies setting \fICURLOPT_POST(3)\fP to 1.
If \fICURLOPT_POSTFIELDS(3)\fP is explicitly set to NULL then libcurl will get
the POST data from the read callback. If you want to send a zero-byte POST set