我想解析受 SSL (https) 保护的 JSON,在 Android 2.x 上我获得:“No Peer Certificate Exception”,而且我(几乎)对证书一无所知,有人可以解释如何步骤逐步将 SSL 证书集成到我的应用程序并使用它(我知道我必须这样做)。那是我当前的代码:
HttpGet httppost = new HttpGet(url);
httppost.setHeader("Content-type", "application/json");
response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
inputStream = entity.getContent();