Java 为什么google places api提供对等证书错误
使用具有以下http请求代码的google places api获取对等证书错误:->(我认为在使用google places api http请求时不需要添加SSLSocketFactory等)有人能告诉我如何修复此问题吗Java 为什么google places api提供对等证书错误,java,android,http,connection,peer,Java,Android,Http,Connection,Peer,使用具有以下http请求代码的google places api获取对等证书错误:->(我认为在使用google places api http请求时不需要添加SSLSocketFactory等)有人能告诉我如何修复此问题吗 public JSONObject showPorts() throws ClientProtocolException, IOException, JSONException{ // StringBuilder port
public JSONObject showPorts()
throws ClientProtocolException, IOException, JSONException{
// StringBuilder portURL = new StringBuilder(pURL);
// HttpGet get = new HttpGet(url);
StringBuilder portURL = new StringBuilder(pURL);
HttpGet get = new HttpGet(portURL.toString());
Log.d(TAG,pURL);
HttpResponse r = client.execute(get);
int status = r.getStatusLine().getStatusCode();
if(status == 200){
Log.d(TAG,"200");
HttpEntity e = r.getEntity();
String data = EntityUtils.toString(e);