解决HttpClient提交json格式请求的中文支持

解决HttpClient提交json格式请求的乱码
PostMethod postMethod = new PostMethod(url);
RequestEntity requestEntity = new StringRequestEntity(requestData,""text/xml"","gbk")
postMethod.setRequestEntity(requestEntity);
int httpReturnCold = httpClient.executeMethod(postMethod);

String responseBody = postMethod.getResponseBodyAsString();

你可能感兴趣的:(java,httpclient,json)