如何在Android上设置SSL验证Peer False?

时间:2014-04-13 13:53:35

标签: java android json ssl

我的网络服务使用Code-Ignite这样的东西“'ssl_verify_peer'=> FALSE”

如何在Android上设置相同的内容?当我联系服务器时,这是我的代码:

HttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(url);
httpGet.setHeader("Authorization", "Basic "+holder);
httpGet.setHeader("X-API-KEY","043c7dd954b0631be2541bc65645917c52d63b0c");
httpGet.setHeader("Accept", "application/json");
httpGet.setHeader("Content-type", "application/json");
ResponseHandler responseHandler = new BasicResponseHandler();
String response = httpClient.execute(httpGet, responseHandler);

0 个答案:

没有答案