Skip to content

[2pt] 'interface' http.client option #2425

Open
@Totktonada

Description

@Totktonada

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'})

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new functionalityhttpRelated 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