Skip to content
Snippets Groups Projects
Commit fc70b2f9 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Add a paragraph about CURLOPT_CUSTOMREQUEST not actually changing libcurl's

behavior, it only changes the actual request method keyword and this is not
always what the user/app wants.
parent 33a8e6c3
No related branches found
No related tags found
No related merge requests found
......@@ -1063,12 +1063,19 @@ option to -1 to make the transfer start from the end of the target file
Pass a curl_off_t as parameter. It contains the offset in number of bytes that
you want the transfer to start from. (Added in 7.11.0)
.IP CURLOPT_CUSTOMREQUEST
Pass a pointer to a zero terminated string as parameter. It will be user
Pass a pointer to a zero terminated string as parameter. It will be used
instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST
when doing an ftp directory listing. This is useful for doing DELETE or other
more or less obscure HTTP requests. Don't do this at will, make sure your
server supports the command first.
Note that libcurl will still act and assume the keyword it would use if you
didn't set your custom one is the one in use and it will act according to
that. Thus, changing this to a HEAD when libcurl otherwise would do a GET
might cause libcurl to act funny, and similar. To switch to a proper HEAD, use
\fICURLOPT_NOBODY\fP, to switch to a proper POST, use \fICURLOPT_POST\fP or
\fICURLOPT_POSTFIELDS\fP and so on.
Restore to the internal default by setting this to NULL.
Many people have wrongly used this option to replace the entire request with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment