HttpClient用法

apache Httpcomponents下载地址:http://hc.apache.org/downloads.cgi

HttpClient client = new DefaultHttpClient();
     HttpGet httpGet = new HttpGet(richURL);
     HttpResponse res = client.execute(httpGet);//请求并获得响应
     String strResult=EntityUtils.toString(res.getEntity());

你可能感兴趣的:(httpclient)