elixirhttp-proxyteslaelixir-mint

Set proxy credentials with Tesla.Adapter.Mint


How can I set proxy credentials when using Tesla.Adapter.Mint. According https://hexdocs.pm/tesla/Tesla.Adapter.Mint.html It should be something like {:http, "127.0.0.1", 8888, []} , but where can I pass credentials just like: {Tesla.Adapter.Hackney, [proxy: {"1.2.3.4", 1234}, proxy_auth: {"user", "pass"}]}?


Solution

  • I think you might be looking for the proxy_headers option:

    • :proxy_headers - a list of headers (Mint.Types.headers/0) to pass when using a proxy. They will be used for the CONNECT request in tunnel proxies or merged with every request for forward proxies.