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.
curl_easy_init(3) | libcurl | curl_easy_init(3) |
NAME
curl_easy_init - Start a libcurl easy sessionDESCRIPTION
This function allocates and returns a CURL easy handle. Such a handle is used as input to other functions in the easy interface. This call must have a corresponding call to curl_easy_cleanup(3) when the operation is complete.EXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
AVAILABILITY
AlwaysRETURN VALUE
If this function returns NULL, something went wrong and you cannot use the other curl functions.SEE ALSO
curl_easy_cleanup(3), curl_easy_duphandle(3), curl_easy_perform(3), curl_easy_reset(3), curl_global_init(3), curl_multi_init(3)December 4, 2023 | libcurl 8.5.0 |