首页 > 代码库 > 远程访问

远程访问

HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(baseUrl + action);
HttpResponse response = httpclient.execute(httpget);
retStr = EntityUtils.toString(response.getEntity());

 

所用到的jar 包:httpcore httpclient
http://www.cnblogs.com/Wen-yu-jing/p/3552154.html