我的网络服务:
HttpClient client = new DefaultHttpClient();
HttpPost method = new HttpPost(url);
if (params != null) {
method.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
}
HttpResponse response = client.execute(method);
InputStream inputStream = response.getEntity().getContent();
String result = convertInputStreamToString(inputStream);
如何设置此代码的缓存, 在没有互联网的情况下回复缓存