我需要阅读这个回声:
http://wee.co.il/Ski/weatherScript.php?op=3
成字符串,我试过:
class RetreiveEcho extends AsyncTask<String, Void, String>
{
private static final String TAG = "Her";
@Override
protected String doInBackground(String... params) {
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://wee.co.il/Ski/weatherScript.php?op=3");
Log.d(TAG, "Hello!");
try {
HttpResponse response = httpclient.execute(httppost);
Log.d(TAG, ""+response);
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
}
现在我只在我的日志中看到:
org.apache.http.message.BasicHttpResponse@4132e5a8