httpclient4 post request garbled

http://my.oschina.net/u/1183927/blog/515969?p=1
1
2
3
4
5
6
HttpPost post=new HttpPost(url);
StringEntity content=new StringEntity(data, Charset.forName("utf -8"));// The second parameter, the content will be encoded after setting

content.setContentType("application/json; charset=UTF-8");
content.setContentEncoding("utf-8");
post.setEntity(content);

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327063226&siteId=291194637