how to make HTTPS calls using AsyncHttpClient?

后端 未结 4 1001
太阳男子
太阳男子 2020-12-08 12:33

i was using AsyncHttpClient link for making http calls but now our server has migrated to HTTPS and I am getting exception javax.net.ssl.SSLPeerUnverified

4条回答
  •  无人及你
    2020-12-08 13:10

    you can also solve this problem, with adding this 1 line.

    asyncHttpClient.setSSLSocketFactory(MySSLSocketFactory.getFixedSocketFactory());
    

提交回复
热议问题