mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +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);
|
||||
else
|
||||
reader = new InputStreamReader(connection.getErrorStream(), StandardCharsets.UTF_8);
|
||||
JsonElement content = parser.parse(reader);
|
||||
return content;
|
||||
try {
|
||||
return parser.parse(reader);
|
||||
} catch (Exception e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private HTTPRequest() {
|
||||
|
|
Loading…
Reference in a new issue