[教程]安卓模拟get获取网页源码

2014-04-23 21:21:07 -0400
public void Get(String url)
{
try
{
HttpGet get = new HttpGet(url);
HttpClient client=new DefaultHttpClient();
HttpResponse response=client.execute(get);
resultString = EntityUtils.toString(response.getEntity());

}
catch (Exception e)
{
resultString = e.toString();
}

}
«Newer      Older»

----Comments(2)----
姚sir (@ykk) | @ at 2015-09-25 11:00:
在安卓中怎么用
姚sir (@ykk) | @ at 2015-09-25 10:59:
没看懂
Comment:
Name:

Back to home

Subscribe | Register | Login | 中文 | N