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

Michael Terry michael@REDACTED
Tue Sep 20 19:47:23 CEST 2016


Thank you, my friend.

On Tue, Sep 20, 2016 at 10:41 AM, Ilya Khaprov
<ilya.khaprov@REDACTED> wrote:
> Hi Michael,
>
> You can force TLS version here:
>
> httpc:request(get, {"https://api.datamarket.azure.com", []}, [{ssl,
> [{versions, ['tlsv1']}]}, {autoredirect, false}], []).
>
> Ilya
>
>> From: michael@REDACTED
>> Date: Tue, 20 Sep 2016 10:29:34 -0700
>> To: erlang-questions@REDACTED
>> Subject: [erlang-questions] httpc:request fails on some sites
>
>>
>> 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
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list