From d185d4e4ccaba6480bedf7a497cb7d5b633576cb Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 10 Nov 2021 11:13:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0sendGet=E6=97=A0=E5=8F=82?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/utils/http/HttpUtils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java index c920f5b12..f57baf0fc 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java @@ -30,6 +30,17 @@ public class HttpUtils { private static final Logger log = LoggerFactory.getLogger(HttpUtils.class); + /** + * 向指定 URL 发送GET方法的请求 + * + * @param url 发送请求的 URL + * @return 所代表远程资源的响应结果 + */ + public static String sendGet(String url) + { + return sendGet(url, StringUtils.EMPTY); + } + /** * 向指定 URL 发送GET方法的请求 *