我从 HTTPS 获得 Json 响应并获得异常
javax.net.ssl.SSLException: Not trusted server certificate
下面是我的代码,无论我尝试使用 HttpGet 还是 HttpPost,我都会在该行得到异常
HttpResponse httpResponse = httpClient.execute(request);
这些是下面用于从 url 获取数据的代码。
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost request = new HttpPost(urlString);
HttpResponse httpResponse = httpClient.execute(request);
希望能得到这个问题的答案。谢谢。