|
|
|
@ -25,9 +25,11 @@ public class RequestClientUtil {
|
|
|
|
|
* @param body 传参body |
|
|
|
|
*/ |
|
|
|
|
public static void postCall(String url, Map body) { |
|
|
|
|
log.info("开始远程调用{}接口",url); |
|
|
|
|
HttpResponse response = HttpRequest.post(url).body(JSON.toJSONString(body)).execute(); |
|
|
|
|
log.info("远程调用{}接口结束",url); |
|
|
|
|
Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> { |
|
|
|
|
throw new ServiceException("远程调用大模型接口" + url + "失败!"); |
|
|
|
|
throw new ServiceException("远程调用接口" + url + "失败!"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|