don't overwrite passed pool option in http clients
This commit is contained in:
parent
c17d83cd73
commit
5e8adf91b4
2 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ defmodule Pleroma.HTTP.Tzdata do
|
|||
|
||||
@impl true
|
||||
def get(url, headers, options) do
|
||||
options = Keyword.put(options, :adapter, pool: :upload)
|
||||
options = Keyword.put_new(options, :adapter, pool: :upload)
|
||||
|
||||
with {:ok, %Tesla.Env{} = env} <- HTTP.get(url, headers, options) do
|
||||
{:ok, {env.status, env.headers, env.body}}
|
||||
|
|
@ -20,7 +20,7 @@ defmodule Pleroma.HTTP.Tzdata do
|
|||
|
||||
@impl true
|
||||
def head(url, headers, options) do
|
||||
options = Keyword.put(options, :adapter, pool: :upload)
|
||||
options = Keyword.put_new(options, :adapter, pool: :upload)
|
||||
|
||||
with {:ok, %Tesla.Env{} = env} <- HTTP.head(url, headers, options) do
|
||||
{:ok, {env.status, env.headers}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue