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_ACCEPT_ENCODING(3) | libcurl | CURLOPT_ACCEPT_ENCODING(3) |
NAME
CURLOPT_ACCEPT_ENCODING - automatic decompression of HTTP downloadsSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
DESCRIPTION
Pass a char * argument specifying what encoding you would like.DEFAULT
NULLPROTOCOLS
HTTPEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* enable all supported built-in compressions */
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
/* Perform the request */
curl_easy_perform(curl);
}
}
AVAILABILITY
This option was called CURLOPT_ENCODING before 7.21.6RETURN 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_HTTP_CONTENT_DECODING(3), CURLOPT_HTTPHEADER(3), CURLOPT_TRANSFER_ENCODING(3)December 4, 2023 | ibcurl 8.5.0 |