1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

CURLOPT_ACCEPT_ENCODING.3: list them comma-separated [ci skip]

This commit is contained in:
Daniel Stenberg 2018-08-27 11:15:21 +02:00
parent 0e7e5e1ad1
commit cc67b0a2ee
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -45,10 +45,14 @@ Alternatively, you can specify exactly the encoding or list of encodings you
want in the response. Four encodings are supported: \fIidentity\fP, meaning want in the response. Four encodings are supported: \fIidentity\fP, meaning
non-compressed, \fIdeflate\fP which requests the server to compress its non-compressed, \fIdeflate\fP which requests the server to compress its
response using the zlib algorithm, \fIgzip\fP which requests the gzip response using the zlib algorithm, \fIgzip\fP which requests the gzip
algorithm and (since curl 7.57.0) \fIbr\fP which is brotli. algorithm and (since curl 7.57.0) \fIbr\fP which is brotli. Provide them in
the string as a comma-separated list of accepted encodings, like:
Set this option to NULL to explicitly disable it, which makes libcurl not send "br, gzip, deflate".
an Accept-Encoding: header and not decompress contents automatically.
Set \fICURLOPT_ACCEPT_ENCODING(3)\fP to NULL to explicitly disable it, which
makes libcurl not send an Accept-Encoding: header and not decompress received
contents automatically.
You can also opt to just include the Accept-Encoding: header in your request You can also opt to just include the Accept-Encoding: header in your request
with \fICURLOPT_HTTPHEADER(3)\fP but then there will be no automatic with \fICURLOPT_HTTPHEADER(3)\fP but then there will be no automatic
@ -88,6 +92,10 @@ if(curl) {
.fi .fi
.SH AVAILABILITY .SH AVAILABILITY
This option was called CURLOPT_ENCODING before 7.21.6 This option was called CURLOPT_ENCODING before 7.21.6
The specific libcurl you're using must have been built with zlib to be able to
decompress gzip and deflate responses and with the brotli library to
decompress brotli responses.
.SH RETURN VALUE .SH RETURN VALUE
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
CURLE_OUT_OF_MEMORY if there was insufficient heap space. CURLE_OUT_OF_MEMORY if there was insufficient heap space.