Skip to content
Snippets Groups Projects
Unverified Commit 48caaff9 authored by Ilya Kosarev's avatar Ilya Kosarev Committed by Alexander Turenko
Browse files

httpc: add curl accept_encoding option

CURLOPT_ACCEPT_ENCODING libcurl option is now supported. This option
enables automatic decompression of HTTP responses.

See https://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html



Closes #4232

Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>

@TarantoolBot document
Title: httpc: add curl accept_encoding option

Update the documentation for client_object:request() parameters to
reflect new accept_encoding option.

It enables automatic decompression of HTTP responses by setting the
contents of the Accept-Encoding header sent in a HTTP request and
enabling decoding of a response when a Content-Encoding header is
received.

This is a request, not an order; the server may or may not do it.
Servers might respond with Content-Encoding even without getting an
Accept-Encoding in the request. Servers might respond with a different
Content-Encoding than what was asked for in the request.

@param accept_encoding specifies what encoding you'd like. This param
can be an empty string which means Accept-Encoding header will contain
all built-in supported encodings. This param can be comma-separated list
of accepted encodings, like: "br, gzip, deflate".

Bundled libcurl supports "identity", meaning non-compressed, "deflate"
which requests the server to compress its response using the zlib
algorithm and "gzip" which requests the gzip algorithm. System libcurl
also possibly supports "br" which is brotli.

See https://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
parent 728d08a6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment