日期:2014-05-16  浏览次数:20392 次

解决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();