1 defmodule Pleroma.HTTP.Connection do
2 @hackney_options [pool: :default]
5 Configure a client connection
11 @spec new(Keyword.t()) :: Tesla.Env.client()
12 def new(opts \\ []) do
13 Tesla.client([], {Tesla.Adapter.Hackney, hackney_options(opts)})
16 # fetch Hackney options
18 defp hackney_options(opts \\ []) do
19 options = Keyword.get(opts, :adapter, [])
20 @hackney_options ++ options