Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tracked by #2639
Totktonada opened this issue Nov 9, 2021 · 1 comment
Open
Tracked by #2639

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

Totktonada opened this issue Nov 9, 2021 · 1 comment
Labels
feature A new functionality http Related to the http module reference [location] Tarantool manual, Reference part

Comments

@Totktonada
Copy link
Member

Totktonada commented Nov 9, 2021

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'})
@Totktonada
Copy link
Member Author

Totktonada commented Nov 9, 2021

BTW, you can use my description of the http client options: https://tarantool.github.io/conf/modules/conf.client.etcd.transport.html (ignore 'Defaults' section, those are defaults from the module).

@veod32 veod32 added this to the Estimate [@veod32] milestone Dec 29, 2021
@veod32 veod32 added server [area] Task relates to Tarantool's server (core) functionality reference [location] Tarantool manual, Reference part feature A new functionality labels Jan 11, 2022
@veod32 veod32 changed the title 'interface' http.client option [2pt] 'interface' http.client option Jan 11, 2022
@veod32 veod32 removed this from the Estimate [@veod32] milestone Jan 11, 2022
@veod32 veod32 added http Related to the http module and removed server [area] Task relates to Tarantool's server (core) functionality labels Mar 6, 2023
@TarantoolBot TarantoolBot removed the 2sp label Jun 7, 2023
@andreyaksenov andreyaksenov added the c api [Area] Related to the Tarantool C API reference label Jun 19, 2023
@andreyaksenov andreyaksenov removed their assignment Nov 29, 2023
@andreyaksenov andreyaksenov removed the c api [Area] Related to the Tarantool C API reference label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality http Related to the http module reference [location] Tarantool manual, Reference part
Projects
None yet
Development

No branches or pull requests

5 participants