From cbeb02950af3b008556f1c628a53dd2e0d97f1fb Mon Sep 17 00:00:00 2001 From: microwin7 Date: Mon, 7 Feb 2022 12:24:05 +0300 Subject: [PATCH] Update HTTPRequest.java --- LauncherCore/src/main/java/pro/gravit/launcher/HTTPRequest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/HTTPRequest.java b/LauncherCore/src/main/java/pro/gravit/launcher/HTTPRequest.java index 70923c62..d33adae1 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/HTTPRequest.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/HTTPRequest.java @@ -27,6 +27,7 @@ public static JsonElement jsonRequest(JsonElement request, String method, URL ur if (request != null) connection.setDoOutput(true); connection.setRequestMethod(method); if (request != null) connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8"); + if (request != null) connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36"); connection.setRequestProperty("Accept", "application/json"); if (TIMEOUT > 0) connection.setConnectTimeout(TIMEOUT);