Mix.install([
{:tesla, github: "elixir-tesla/tesla", branch: "master"},
{:mint, "1.5.1"},
{:castore, "1.0.2"}
])
defmodule TeslaMintClientActiveMode do
use Tesla
adapter(Tesla.Adapter.Mint)
def get_example_http2_site() do
get("https://remoteok.io", mode: :active)
end
end
TeslaMintClientActiveMode.get_example_http2_site()
defmodule TeslaMintClientPassiveMode do
use Tesla
adapter(Tesla.Adapter.Mint)
def get_example_http2_site() do
get("https://remoteok.io", mode: :passive)
end
end
TeslaMintClientPassiveMode.get_example_http2_site()