Open
Description
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:
- nil - works as '2-tls' by default.
- '1.1' - sets HTTP/1.1 version.
- '2' - sets HTTP/2 version that falls back to HTTP/1.1 if cannot be
negotiated with the server. - '2-tls' - works as '2' for HTTPS and as '1.1' for plain text HTTP.
- '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.