Skip to content
Snippets Groups Projects
Commit 04e75f2c authored by Konstantin Belyavskiy's avatar Konstantin Belyavskiy Committed by Vladimir Davydov
Browse files

httpc: allow to use unix socket as connection endpoint

This patch adds a new connection option to http client, 'unix_socket'.
The option specifies the path to the unix socket to use as connection
endpoint instead of TCP:

  httpc = require('http.client')
  httpc.request('GET', 'http://localhost/index.html', nil,
                {unix_socket = '/var/run/docker.sock'})

The option is supported only if tarantool was built with libcurl 7.40.0
or newer. For older versions, an attempt to use the option will result
in a Lua exception.

Suggested and first implemented by @rosik.
The test was refactored by @locker.

Closes #3040
parent 33980fc5
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