Sortix 1.1dev ports manual
This manual documents Sortix 1.1dev ports. You can instead view this document in the latest official manual.
CURLOPT_CUSTOMREQUEST(3) | curl_easy_setopt options | CURLOPT_CUSTOMREQUEST(3) |
NAME
CURLOPT_CUSTOMREQUEST - custom string for requestSYNOPSIS
#include <curl/curl.h>DESCRIPTION
Pass a pointer to a zero terminated string as parameter.- HTTP
- Instead of GET or HEAD when performing HTTP based requests.
This is particularly useful, for example, for performing an HTTP DELETE
request.
- FTP
- Instead of LIST and NLST when performing FTP directory listings.
- IMAP
- Instead of LIST when issuing IMAP based requests.
- POP3
- Instead of LIST and RETR when issuing POP3 based requests.
- SMTP
- Instead of a HELP or VRFY when issuing SMTP based requests.
DEFAULT
NULLPROTOCOLS
HTTP, FTP, IMAP, POP3 and SMTPEXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); /* DELETE the given path */ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE"); ret = curl_easy_perform(curl); curl_easy_cleanup(curl); }
AVAILABILITY
IMAP is supported since 7.30.0, POP3 since 7.26.0 and SMTP since 7.34.0.RETURN VALUE
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.SEE ALSO
CURLOPT_HTTPHEADER(3), CURLOPT_NOBODY(3), CURLOPT_REQUEST_TARGET(3),April 17, 2018 | libcurl 7.69.0 |