http传输请求头改变之后的一些坑
http://www.importnew.com/26779.html
错误写法
// StringEntity s = new StringEntity(dataStr);
// s.setContentEncoding("UTF-8");
// s.setContentType("application/json");
//
// post.setEntity(s);
HttpResponse hp = client.execute(post);
更改之后(正确写法)
post.addHeader("Content-Type", "application/json; charset=UTF-8");
post.setHeader("Accept", "application/json");
post.setEntity(new StringEntity(dataStr,Charset.forName("UTF-8")));
HttpResponse hp = client.execute(post);