Skip to content
Snippets Groups Projects
  • Ilya Kosarev's avatar
    48caaff9
    httpc: add curl accept_encoding option · 48caaff9
    Ilya Kosarev authored
    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
    httpc: add curl accept_encoding option
    Ilya Kosarev authored
    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