Open
Description
Product: Tarantool
Since: 2.10.0-beta2
Root document: a new interface
request option (https://www.tarantool.io/en/doc/latest/reference/reference_lua/http/#request-options)
SME: @ norguhtar
Details
It allows setting source network interface for an outgoing
connection using the interface name or IP address.
For additional info see https://curl.haxx.se/libcurl/c/CURLOPT_INTERFACE.html
Requested by @norguhtar in tarantool/tarantool@99272d7
Example
Interface name (macOS):
http_client = require('http.client').new()
http_client:get('https://httpbin.org/get', {interface = 'en0'})
IP address:
http_client:get('https://httpbin.org/get', {interface = '172.18.112.36'})