|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package org.jeecg.common.util;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.xkcoding.http.HttpUtil;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.jeecg.config.RestTemplateConfig;
|
|
|
|
|
@ -287,10 +288,12 @@ public class RestUtil {
|
|
|
|
|
headers.add("Accept", "*/*");
|
|
|
|
|
headers.add("Content-Type", "application/json");
|
|
|
|
|
String requestBody = requestBodyJson.toJSONString();
|
|
|
|
|
HttpEntity entity = new HttpEntity(requestBody, headers);
|
|
|
|
|
ResponseEntity<String> responseEntity=restTemplate.postForEntity(httpUrl,entity,String.class);
|
|
|
|
|
String result = HttpUtil.post(httpUrl, requestBodyJson.toJSONString());
|
|
|
|
|
log.debug("post_responseBody:");
|
|
|
|
|
log.debug(result);
|
|
|
|
|
/*HttpEntity entity = new HttpEntity(requestBody, headers);
|
|
|
|
|
ResponseEntity<String> responseEntity=restTemplate.postForEntity(httpUrl,entity,String.class);*/
|
|
|
|
|
//获取返回结果
|
|
|
|
|
String result= responseEntity.getBody();
|
|
|
|
|
return JSONObject.parseObject(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|