在网络连接中需要发送xml格式的字符串,该字符串比较长
[code="java"]
Log.e(tag, "sendData="+sendData);//这里就已经被截掉了,why?
HttpPost post=new HttpPost(urlString);
List params=new ArrayList();
params.add(new BasicNameValuePair("data",sendData));//这里sendData比较长
HttpEntity entity=new UrlEncodedFormEntity(params,"UTF-8");
post.setEntity(entity);
HttpClient client=new DefaultHttpClient();
HttpResponse response=client.execute(post);
int statusCode=response.getStatusLine().getStatusCode();
if(statusCode==HttpStatus.SC_OK){//200
result=EntityUtils.toString(response.getEntity());
}else{
}
[/code]
然后我试试:
Log.i(tag,"12345678900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000123456789");
打印这个,发现也被截掉了,why?
不信大家可以试试!