以下是我遇到异常(超时)的代码,请提供任何解决方案或教程。在 4.0.4 api 级别设备上使用
HttpClient client = new DefaultHttpClient();
HttpPost request = new HttpPost(url);
List<NameValuePair> params = new LinkedList<NameValuePair>();
> param has some values and a string of bitmap.
HttpResponse response = client.execute(request);
StringBuilder receivedData = new StringBuilder();
BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String line = null;
while ((line = reader.readLine()) != null)
{
receivedData.append(line);
}