<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Michael,<br><br>You can force TLS version here:<br><br>httpc:request(get, {"https://api.datamarket.azure.com", []}, [{ssl, [{versions, ['tlsv1']}]}, {autoredirect, false}], []).<br><br>Ilya<br><br><div>> From: michael@michaelterry.org<br>> Date: Tue, 20 Sep 2016 10:29:34 -0700<br>> To: erlang-questions@erlang.org<br>> Subject: [erlang-questions] httpc:request fails on some sites<br>> <br>> Hi there,<br>> <br>> Does anyone here know the likely reason the last line is failing?<br>> <br>> ~$ curl https://api.datamarket.azure.com<br>> <html><head><title>Object moved</title></head><body><br>> <h2>Object moved to <a href="https://datamarket.azure.com">here</a>.</h2><br>> </body></html><br>> ~$ erl<br>> Erlang/OTP 19 [erts-8.0.2] [source-753b9b9] [64-bit] [smp:2:2]<br>> [async-threads:10] [hipe] [kernel-poll:false]<br>> <br>> Eshell V8.0.2  (abort with ^G)<br>> 1> inets:start().<br>> ok<br>> 2> ssl:start().<br>> ok<br>> 3> httpc:request("https://www.google.com").<br>> {ok,{{"HTTP/1.1",200,"OK"}, ...truncated...<br>> 4> httpc:request("https://api.datamarket.azure.com").<br>> {error,{failed_connect,[{to_address,{"api.datamarket.azure.com",<br>>                                      443}},<br>>                         {inet,[inet],closed}]}}<br>> <br>> https://gist.github.com/formido/db472011f2dd3f47a99b66bd8784ee55<br>> <br>> Cheers,<br>> Mike<br>> _______________________________________________<br>> erlang-questions mailing list<br>> erlang-questions@erlang.org<br>> http://erlang.org/mailman/listinfo/erlang-questions<br></div>                                          </div></body>
</html>