Java - Retrieving Result from OkHttp Asynchronous GET
问题 So I have a web-app in Spring Boot, and there is a part where I make many HTTP requests to an API, and it seems to timeout if too many requests are made. I heard that switching from Synchronous to Asynchronous requests might help this issue. Using OkHttp, this is what my Synchronous GET request looks like: private JSONObject run(String url) throws Exception { Request newRequest = new Request.Builder() .url(url) .addHeader("Authorization", token) .build(); try (Response response = client