Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
CURLOPT_CUSTOMREQUEST(3) | libcurl | CURLOPT_CUSTOMREQUEST(3) |
NAME
CURLOPT_CUSTOMREQUEST - custom request methodSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CUSTOMREQUEST, char *method);
DESCRIPTION
Pass a pointer to a null-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
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* DELETE the given path */
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
res = 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
CURLINFO_EFFECTIVE_METHOD(3), CURLOPT_HTTPHEADER(3), CURLOPT_NOBODY(3), CURLOPT_REQUEST_TARGET(3)December 4, 2023 | ibcurl 8.5.0 |