diff --git a/src/main/java/com/sjhy/plugin/tool/HttpUtils.java b/src/main/java/com/sjhy/plugin/tool/HttpUtils.java index 12fc10a..1e430dc 100644 --- a/src/main/java/com/sjhy/plugin/tool/HttpUtils.java +++ b/src/main/java/com/sjhy/plugin/tool/HttpUtils.java @@ -77,6 +77,14 @@ public final class HttpUtils { return handlerRequest(httpGet); } + public static String getRemoteUrl(String url){ + HttpGet httpGet = new HttpGet(url); + httpGet.setHeader(HttpHeaders.USER_AGENT, USER_AGENT); + httpGet.setHeader(HttpHeaders.CONTENT_TYPE, CONTENT_TYPE); + httpGet.setConfig(getDefaultConfig()); + return handlerRequest(httpGet); + } + /** * post json请求 *