1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

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.
This commit is contained in:
Daniel Stenberg 2007-10-09 14:53:50 +00:00
parent 33a8e6c30c
commit fc70b2f916

View File

@ -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