[erlang-questions] httpc:request fails on some sites

Michael Terry <>
Tue Sep 20 19:29:34 CEST 2016


Hi there,

Does anyone here know the likely reason the last line is failing?

~$ curl https://api.datamarket.azure.com
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="https://datamarket.azure.com">here</a>.</h2>
</body></html>
~$ erl
Erlang/OTP 19 [erts-8.0.2] [source-753b9b9] [64-bit] [smp:2:2]
[async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.0.2  (abort with ^G)
1> inets:start().
ok
2> ssl:start().
ok
3> httpc:request("https://www.google.com").
{ok,{{"HTTP/1.1",200,"OK"}, ...truncated...
4> httpc:request("https://api.datamarket.azure.com").
{error,{failed_connect,[{to_address,{"api.datamarket.azure.com",
                                     443}},
                        {inet,[inet],closed}]}}

https://gist.github.com/formido/db472011f2dd3f47a99b66bd8784ee55

Cheers,
Mike


More information about the erlang-questions mailing list