mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] Фикс отправки json запросов к mojang
This commit is contained in:
parent
c658a85c35
commit
a9cc2841ac
1 changed files with 6 additions and 2 deletions
|
@ -58,8 +58,12 @@ public static JsonElement jsonRequest(JsonElement request, URL url) throws IOExc
|
||||||
reader = new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8);
|
reader = new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8);
|
||||||
else
|
else
|
||||||
reader = new InputStreamReader(connection.getErrorStream(), StandardCharsets.UTF_8);
|
reader = new InputStreamReader(connection.getErrorStream(), StandardCharsets.UTF_8);
|
||||||
JsonElement content = parser.parse(reader);
|
try {
|
||||||
return content;
|
return parser.parse(reader);
|
||||||
|
} catch (Exception e)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private HTTPRequest() {
|
private HTTPRequest() {
|
||||||
|
|
Loading…
Reference in a new issue