|
|
|
@@ -114,12 +114,14 @@ public class TtWebServiceImpl implements TtWebService, RequestHttp<CloseableHttp |
|
|
|
httpPost.setConfig(config); |
|
|
|
} |
|
|
|
httpPost.setHeader("Content-Type","multipart/form-data"); |
|
|
|
|
|
|
|
log.info("------------"+WxGsonBuilder.create().toJson(params)); |
|
|
|
StringEntity entity = new StringEntity(WxGsonBuilder.create().toJson(params), Consts.UTF_8); |
|
|
|
httpPost.setEntity(entity); |
|
|
|
|
|
|
|
try (CloseableHttpResponse response = getRequestHttpClient().execute(httpPost)) { |
|
|
|
|
|
|
|
String resultContent = new BasicResponseHandler().handleResponse(response); |
|
|
|
log.info("--------------"+resultContent); |
|
|
|
JSONObject jsonObject = JSON.parseObject(resultContent); |
|
|
|
JSONObject data = jsonObject.getJSONObject("data"); |
|
|
|
WxError error = WxError.fromJson(data.toJSONString()); |
|
|
|
|