Skip to content

feedback: Module http | Tarantool (default HTTP client is not documented) #3982

Closed
@TarantoolBot

Description

@TarantoolBot

<…>es into account the environment variables libcurl understands.

|Creating a client|
To create an HTTP client, call the http.client.new() function:
<…>

https://www.tarantool.io/en/doc/latest/reference/reference_lua/http/

Documentation doesn't describe using of the default HTTP client. However, default HTTP client is used in a real projects and in Tarantool Cookbook 1.

By default, Lua module http.client contains a default instance of http client and access to its methods is available using . :

-- Default HTTP client.
local http = require('http.client')
http.get('https://luajit.org/') -- Access to methods via `.`.
    
-- New HTTP client instance.
local httpc = http.new()
httpc:get('https://luajit.org/') -- Access to methods via `:`.

Footnotes

  1. https://www.tarantool.io/en/doc/latest/how-to/app/cookbook/#http-get-lua

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions