mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Update HTTPRequest.java
This commit is contained in:
parent
6ab0c7d6a2
commit
6c8ba831c2
1 changed files with 1 additions and 0 deletions
|
@ -39,6 +39,7 @@ public static JsonElement jsonRequest(JsonElement request, String method, URL ur
|
||||||
.uri(url.toURI())
|
.uri(url.toURI())
|
||||||
.header("Content-Type", "application/json; charset=UTF-8")
|
.header("Content-Type", "application/json; charset=UTF-8")
|
||||||
.header("Accept", "application/json")
|
.header("Accept", "application/json")
|
||||||
|
.header("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")
|
||||||
.timeout(Duration.ofMillis(TIMEOUT))
|
.timeout(Duration.ofMillis(TIMEOUT))
|
||||||
.build();
|
.build();
|
||||||
HttpResponse<InputStream> response = client.send(request1, HttpResponse.BodyHandlers.ofInputStream());
|
HttpResponse<InputStream> response = client.send(request1, HttpResponse.BodyHandlers.ofInputStream());
|
||||||
|
|
Loading…
Reference in a new issue