http-api: Don't make game thread wait for xtea response

This commit is contained in:
Lucwousin
2019-07-16 17:17:07 +02:00
parent ef6ea5b18f
commit 3cca59439f

View File

@@ -62,18 +62,6 @@ public class XteaClient
.url(url)
.build();
try
{
try (Response response = RuneLiteAPI.RLP_CLIENT.newCall(request).execute())
{
logger.debug("xtea response " + response.code());
}
}
catch (IOException e)
{
e.printStackTrace();
}
RuneLiteAPI.RLP_CLIENT.newCall(request).enqueue(new Callback()
{
@Override
@@ -114,9 +102,7 @@ public class XteaClient
{
InputStream in = response.body().byteStream();
// CHECKSTYLE:OFF
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<XteaKey>>()
{
}.getType());
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<XteaKey>>() {}.getType());
// CHECKSTYLE:ON
}
catch (JsonParseException ex)