制作采用Android凌空HTTPS请求 [英] Making a HTTPS request using Android Volley

查看:152
本文介绍了制作采用Android凌空HTTPS请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让使用该code进行HTTPS请求:

I am trying to make a https request using this code:

RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
request = new Request<String>(Request.Method.GET,"https://devblahblahblah.com/service/etc",errListener);

但我收到此错误:

but I am getting this error:

com.android.volley.NoConnectionError:   javax.net.ssl​​.SSLHandshakeException:   java.security.cert.CertPathValidatorException:为信任锚   找不到证书路径。

com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

两点:

  1. 的HTTPS证书是有效的。轻松打开没有浏览器的任何警告。
  2. 在上面的code正常工作与HTTP链接。

其实,我需要知道,如果有使用,我会成功的打了一个HTTPS URL的任何开关/在Android凌空构架的选择吗?

I actually need to know if there are any switches/options in the Android Volley framework by using which I'll successfully hit a HTTPS URL?

推荐答案

也许这个环节将是对你有所帮助:的采用Android凌空使用自签名SSL证书

Probably this link will be helpful for you: Using Android Volley With Self-Signed SSL Certificate

这篇关于制作采用Android凌空HTTPS请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆