|
|
|
@ -97,6 +97,11 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
|
|
|
|
|
httpParamers.setJsonParamer(requestBodyJson);
|
|
|
|
|
//发起请求
|
|
|
|
|
String responseJsonStr = HttpClient.doPost(url, httpParamers, null, apiConfig.getConnectTimeout(), apiConfig.getReadTimeout());
|
|
|
|
|
// 检查响应是否为 HTML
|
|
|
|
|
if (responseJsonStr.contains("<html>")) {
|
|
|
|
|
// 直接返回 HTML 响应
|
|
|
|
|
throw new Exception("请求"+url+"返回 HTML 响应: \n" + responseJsonStr);
|
|
|
|
|
}
|
|
|
|
|
ResultData<String> resultData = JSONUtil.toBean(responseJsonStr, ResultData.class);
|
|
|
|
|
prevailCloudLog.setResponseParam("msg:"+resultData.getMessage()+",status:"+resultData.getStatus());
|
|
|
|
|
prevailCloudLog.setStatus(resultData.getStatus());
|
|
|
|
|