How do I do an HTTPS request with Erlang?

前端 未结 2 1700
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 14:47

I tried the inets library but it times out. I don\'t think it supports HTTPS. I am trying to use ibrowse, but it isn\'t working.

2条回答
  •  心在旅途
    2020-12-28 15:47

    This is what worked for me:

    application:start(crypto),
    application:start(public_key),
    application:start(ssl),
    application:start(inets).
    
    httpc:request(head, {"https://example.com", []}, [{ssl,[{verify,0}]}], []).
    

提交回复
热议问题