diff options
author | CarlosEDP <me@carlosedp.com> | 2015-07-02 11:59:00 -0300 |
---|---|---|
committer | CarlosEDP <me@carlosedp.com> | 2015-07-03 16:40:28 -0300 |
commit | 38cc32c40afdf8e999d8705501acd7e13918cdc9 (patch) | |
tree | a62ee132b9db7248cbb61116675936d515108c8b /bootstrap | |
parent | 46ca2bb6b0e9c99c7a5b4efb7b9efc310c0982b8 (diff) |
Added rebar profile to httpc initialization and calls.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -9,6 +9,8 @@ main(_Args) -> application:start(public_key), application:start(ssl), inets:start(), + inets:start(httpc, [{profile, rebar}]), + set_httpc_options(), %% Fetch and build deps required to build rebar3 BaseDeps = [{providers, []} @@ -82,10 +84,10 @@ extract(Binary) -> {ok, Contents}. request(Url) -> - set_httpc_options(), case httpc:request(get, {Url, []}, [{relaxed, true}], - [{body_format, binary}]) of + [{body_format, binary}], + rebar) of {ok, {{_Version, 200, _Reason}, _Headers, Body}} -> {ok, Body}; Error -> @@ -114,7 +116,7 @@ set_httpc_options(_, []) -> set_httpc_options(Scheme, Proxy) -> {ok, {_, _, Host, Port, _, _}} = http_uri:parse(Proxy), - httpc:set_options([{Scheme, {{Host, Port}, []}}]). + httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar). compile(App, FirstFiles) -> Dir = filename:join(filename:absname("_build/default/lib/"), App), |