Skip to content

Commit

Permalink
Revert changes in src/vendored/
Browse files Browse the repository at this point in the history
  • Loading branch information
zuiderkwast committed May 2, 2022
1 parent 81c8894 commit a74054c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/vendored/r3_hex_http_httpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,6 @@
%%====================================================================

request(Method, URI, ReqHeaders, Body, AdapterConfig) ->
case os:getenv("REBAR_OFFLINE") of
"1" ->
{error, {offline, URI}};
_ ->
request_online(Method, URI, ReqHeaders, Body, AdapterConfig)
end.

%%====================================================================
%% Internal functions
%%====================================================================

request_online(Method, URI, ReqHeaders, Body, AdapterConfig) ->
Profile = maps:get(profile, AdapterConfig, default),
Request = build_request(URI, ReqHeaders, Body),
case httpc:request(Method, Request, [], [{body_format, binary}], Profile) of
Expand All @@ -32,6 +20,9 @@ request_online(Method, URI, ReqHeaders, Body, AdapterConfig) ->
{error, Reason} -> {error, Reason}
end.

%%====================================================================
%% Internal functions
%%====================================================================

build_request(URI, ReqHeaders, Body) ->
build_request2(binary_to_list(URI), dump_headers(ReqHeaders), Body).
Expand Down

0 comments on commit a74054c

Please sign in to comment.