I was messing around, tried to make a multiplayer game in java, made a window, a player, etc... I then proceeded to send a request to my server to get the player positions, send them too
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
But whenever I send a get request, I get the response successfully, but the window freezes when it's getting the response, Any help please?