ssl验证错误

AsyncHttpClient 源码分析

错误信息为hostname in certificate didn't match,当请求的url为https时需要ssl证书验证。报错。
@param fixNoHttpResponseException Whether to fix or not issue, by omitting SSL verification
     * @param httpPort                   HTTP port to be used, must be greater than 0
     * @param httpsPort                  HTTPS port to be used, must be greater than 0

解决选用带参的构造器new AsyncHttpClient(true,80,443);
展开阅读全文

没有更多推荐了,返回首页