[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 14/163: docs: clarify CURLOPT_HTTPGET somewhat
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 14/163: docs: clarify CURLOPT_HTTPGET somewhat |
Date: |
Sun, 05 Aug 2018 12:35:40 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit d5a2df5f1d41787ff7847466fee48a2fefba6fbd
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon May 21 10:26:24 2018 +0200
docs: clarify CURLOPT_HTTPGET somewhat
Reported-by: bsammon on github
Fixes #2590
---
docs/libcurl/opts/CURLOPT_HTTPGET.3 | 13 +++++++++----
docs/libcurl/opts/CURLOPT_POST.3 | 6 +++---
docs/libcurl/opts/CURLOPT_POSTFIELDS.3 | 4 ++--
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3
b/docs/libcurl/opts/CURLOPT_HTTPGET.3
index 36995fb33..831fed81a 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPGET.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <address@hidden>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -34,6 +34,10 @@ same curl \fIhandle\fP.
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
@@ -44,10 +48,10 @@ curl = curl_easy_init();
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
@@ -56,4 +60,5 @@ Along with HTTP
.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) "
diff --git a/docs/libcurl/opts/CURLOPT_POST.3 b/docs/libcurl/opts/CURLOPT_POST.3
index 71bbd2eea..66e5c6ac7 100644
--- a/docs/libcurl/opts/CURLOPT_POST.3
+++ b/docs/libcurl/opts/CURLOPT_POST.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -57,8 +57,8 @@ adding a header like "Transfer-Encoding: chunked" with
\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
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
index 285ab2551..857e1d987 100644
--- a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -45,7 +45,7 @@ used by HTML forms. Change Content-Type with
\fICURLOPT_HTTPHEADER(3)\fP.
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
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 23/163: schannel: make CAinfo parsing resilient to CR/LF, (continued)
- [GNUnet-SVN] [gnurl] 23/163: schannel: make CAinfo parsing resilient to CR/LF, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 35/163: schannel: add failf calls for client certificate failures, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 25/163: tftp: make sure error is zero terminated before printfing it, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 06/163: bump: start working on the pending 7.61.0, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 20/163: KNOWN_BUGS: mention the -O with %-encoded file names, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 22/163: CURLOPT_ACCEPT_ENCODING.3: add brotli and clarify a bit, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 11/163: docs: mention HAproxy protocol "version 1", gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 16/163: configure: compile-time SIZEOF checks, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 34/163: winbuild: In MakefileBuild.vc fix typo DISTDIR->DIRDIST, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 18/163: curl: added --styled-output, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 14/163: docs: clarify CURLOPT_HTTPGET somewhat,
gnunet <=
- [GNUnet-SVN] [gnurl] 24/163: configure: add missing m4/ax_compile_check_sizeof.m4, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 21/163: RELEASE-NOTES: synced, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 28/163: cmake: set -d postfix for debug builds if not specified using -DCMAKE_DEBUG_POSTFIX explicitly, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 53/163: os400: sync EBCDIC wrappers and ILE/RPG binding with latest options, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 32/163: content_encoding: handle zlib versions too old for Z_BLOCK, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 38/163: mailmap: Max Savenkov, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 31/163: multi: provide a socket to wait for in Curl_protocol_getsock, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 41/163: cmdline-opts/gen.pl: warn if mutexes: or see-also: list non-existing options, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 44/163: configure: fix ssh2 linking when built with a static mbedtls, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 67/163: curl_addrinfo: use same #ifdef conditions in source as header, gnunet, 2018/08/05