Class JavaRestClient

java.lang.Object
technology.sola.engine.networking.rest.JavaRestClient
All Implemented Interfaces:
RestClient

@NullMarked public class JavaRestClient extends Object implements RestClient
The Java-based implementation of RestClient utilizing HttpURLConnection.
  • Constructor Details

    • JavaRestClient

      public JavaRestClient()
  • Method Details

    • request

      public void request(String method, String path, technology.sola.json.JsonElement body, Consumer<HttpResponse> httpResponseSupplier)
      Description copied from interface: RestClient
      Creates and sends an HTTP request. The HttpResponse from the server as provided in a callback.

      Note: body is ignored when method is "GET"

      Specified by:
      request in interface RestClient
      Parameters:
      method - the http method for the request
      path - the path for the request
      body - the request body
      httpResponseSupplier - the callback when the request finishes and the response is available