Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
CURLOPT_POSTFIELDS(3) | curl_easy_setopt options | CURLOPT_POSTFIELDS(3) |
NAME
CURLOPT_POSTFIELDS - data to POST to serverSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDS, char *postdata);
DESCRIPTION
Pass a char * as parameter, pointing to the full data to send in an HTTP POST operation. You must make sure that the data is formatted the way you want the server to receive it. libcurl will not convert or encode it for you in any way. For example, the web server may assume that this data is url-encoded.DEFAULT
NULLPROTOCOLS
HTTPEXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
const char *data = "data to send";
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* size of the POST data */
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 12L);
/* pass in a pointer to the data - libcurl will not copy */
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
curl_easy_perform(curl);
}
AVAILABILITY
AlwaysRETURN VALUE
Returns CURLE_OKSEE ALSO
CURLOPT_POSTFIELDSIZE(3), CURLOPT_READFUNCTION(3),May 17, 2022 | libcurl 7.84.0 |