From 38cc32c40afdf8e999d8705501acd7e13918cdc9 Mon Sep 17 00:00:00 2001 From: CarlosEDP Date: Thu, 2 Jul 2015 11:59:00 -0300 Subject: Added rebar profile to httpc initialization and calls. --- bootstrap | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 8a0afd6..4fed22a 100755 --- a/bootstrap +++ b/bootstrap @@ -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), -- cgit v1.1