Skip to content

Commit

Permalink
create HTTP.config/0 to expose default hex core configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cgerling committed May 4, 2023
1 parent 685b307 commit 538577d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/hex/http.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ defmodule Hex.HTTP do
@request_redirects 3
@request_retries 2

@spec config() :: :mix_hex_core.config()
def config do
%{
:mix_hex_core.default_config()
| http_adapter: {__MODULE__, %{}}
}
end

@impl :mix_hex_http
def request(method, url, headers, body, opts \\ []) do
headers =
Expand Down

0 comments on commit 538577d

Please sign in to comment.