HttpClient用法
程序员文章站
2022-07-12 20:34:56
...
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 client = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(richURL);
HttpResponse res = client.execute(httpGet);//请求并获得响应
String strResult=EntityUtils.toString(res.getEntity());
上一篇: Java基础知识 三 流程控制语句
下一篇: HttpClient用法