public static String getResultForHttpGet(String url) throws ClientProtocolException, IOException
{
String result="";HttpGet httpGet=new HttpGet(url);//与HttpPost区别所在,这里是将参数在地址中传递
HttpResponse response=new DefaultHttpClient().execute(httpGet);
if(response.getStatusLine().getStatusCode()==200){
HttpEntity entity=response.getEntity();
result=EntityUtils.toString(entity, HTTP.UTF_8);
}
return result;
}