Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
CURLOPT_POST(3) | Library Functions Manual | CURLOPT_POST(3) |
NAME
CURLOPT_POST - make an HTTP POSTDESCRIPTION
A parameter set to 1 tells libcurl to do a regular HTTP post. This also makes libcurl use a "Content-Type: application/x-www-form-urlencoded" header. This is the most commonly used POST method.DEFAULT
0, disabledPROTOCOLS
This functionality affects http onlyEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_POST, 1L);
/* set up the read callback with CURLOPT_READFUNCTION */
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
AVAILABILITY
Added in curl 7.1RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSO
CURLOPT_HTTPPOST(3), CURLOPT_POSTFIELDS(3), CURLOPT_UPLOAD(3)2024-12-28 | libcurl |