projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring of :if_func / :unless_func plug options (general availability). Added...
[akkoma]
/
lib
/
pleroma
/
http
/
http.ex
diff --git
a/lib/pleroma/http/http.ex
b/lib/pleroma/http/http.ex
index 466a94adc3af4195ff0c88b638f59f1ef04fea42..583b564842fe79477f0205ef758ab2b5c094351f 100644
(file)
--- a/
lib/pleroma/http/http.ex
+++ b/
lib/pleroma/http/http.ex
@@
-56,10
+56,9
@@
defmodule Pleroma.HTTP do
{:ok, Env.t()} | {:error, any()}
def request(method, url, body, headers, options) when is_binary(url) do
uri = URI.parse(url)
{:ok, Env.t()} | {:error, any()}
def request(method, url, body, headers, options) when is_binary(url) do
uri = URI.parse(url)
- received_adapter_opts = Keyword.get(options, :adapter, [])
- adapter_opts = Connection.options(uri, received_adapter_opts)
+ adapter_opts = Connection.options(uri, options[:adapter] || [])
options = put_in(options[:adapter], adapter_opts)
options = put_in(options[:adapter], adapter_opts)
- params =
Keyword.get(options, :params, [])
+ params =
options[:params] || []
request = build_request(method, headers, options, url, body, params)
adapter = Application.get_env(:tesla, :adapter)
request = build_request(method, headers, options, url, body, params)
adapter = Application.get_env(:tesla, :adapter)