code: public JsonObject sendQuery(FutureAPIResponse response)
        throws ExecutionException, InterruptedException, IOException {
      int status = response.get().getStatus();
      String message = response.get().getMessage();
  
      if (status != HTTP_OK) {
        throw new IOException(status + " " + message);
      }
      return ((JsonObject) parser.parse(message));
    }
docs: Gets query result from a previously sent asynchronous request.