mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-09-19 18:22:27 +08:00
增加新的统一下单接口,并添加对接口格式的单元测试,并未对实际功能进行测试
This commit is contained in:
@@ -35,6 +35,12 @@ public class SimplePostRequestExecutor implements RequestExecutor<String, String
|
||||
|
||||
try (CloseableHttpResponse response = httpclient.execute(httpPost)) {
|
||||
String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response);
|
||||
if (responseContent.isEmpty()) {
|
||||
throw new WxErrorException(
|
||||
WxError.newBuilder().setErrorCode(9999).setErrorMsg("无响应内容")
|
||||
.build());
|
||||
}
|
||||
|
||||
if (responseContent.startsWith("<xml>")) {
|
||||
//xml格式输出直接返回
|
||||
return responseContent;
|
||||
|
Reference in New Issue
Block a user