http: actually pass the options list to the Connection factory

This commit is contained in:
William Pitcock 2019-03-07 23:32:58 +00:00
parent 50ba4ba2c9
commit 773f532b14

View File

@ -42,7 +42,7 @@ def request(method, url, body \\ "", headers \\ [], options \\ []) do
|> Builder.add_param(:body, :body, body)
|> Builder.add_param(:query, :query, params)
|> Enum.into([])
|> (&Tesla.request(Connection.new(), &1)).()
|> (&Tesla.request(Connection.new(options), &1)).()
rescue
e ->
{:error, e}