可以尝试一下方法解决:
1、
httpPost.setHeader("Content-Type", "application/json; charset=UTF-8");
2、
httpPost.setEntity(new UrlEncodedFormEntity(nvps,"utf-8"));
3、如果还是不行,可以试下这种
httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
entity.setContentType(ContentType.APPLICATION_JSON);
参考:
https://chenzhihao.cc/archives/153