From 70d3db24f88c5c820be1345670b29236229af931 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 9 Nov 2021 10:46:42 +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/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java b/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java index 967f84001..949b22dd8 100644 --- a/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java +++ b/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, Constants.UTF8); + } + /** * 向指定 URL 发送GET方法的请求 *