How to do HTTPS request from Phoenix and ignore the CA error

a 夏天 提交于 2020-08-04 05:09:31

问题


I'm trying to call a dev environment REST service from my phoenix server, but I don't want to whitelist the CA. For the record, I don't even know how to add the CA key to Phoenix's whitelist.

How to do https request from phoenix while also ignoring the SSL's CA error?


回答1:


Using HTTPoison, you need to pass the :insecure hackney option.

HTTPoison.get! url, [], hackney: [:insecure]


来源:https://stackoverflow.com/questions/32767162/how-to-do-https-request-from-phoenix-and-ignore-the-ca-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!