Skip to content

http_version option for a set of functions in #4128

Open
@TarantoolBot

Description

@TarantoolBot

Related dev. issue(s): tarantool/tarantool#9806

Product: Tarantool
Since: 3.1
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/http/
SME: @ Col-Waltz

Details

http.client module.

The http_version option allows to set version of http in functions like
request(), post(), get() and etc using this curl option:
https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html
The http_version takes one of the strings listed below or a nil value
and sets the appropriate protocol version.

List of supported values:

  1. nil - works as '2-tls' by default.
  2. '1.1' - sets HTTP/1.1 version.
  3. '2' - sets HTTP/2 version that falls back to HTTP/1.1 if cannot be
    negotiated with the server.
  4. '2-tls' - works as '2' for HTTPS and as '1.1' for plain text HTTP.
  5. '2-prior-knowledge' sets HTTP/2 version without HTTP/1.1 at back.
    It requires prior knowledge that the server supports HTTP/2.
    Requested by @ Col-Waltz in tarantool/tarantool@c3695de.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.1httpRelated to the http modulereference[location] Tarantool manual, Reference part

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions