java.lang.Object
technology.sola.engine.networking.rest.JavaRestClient
- All Implemented Interfaces:
RestClient
The Java-based implementation of
RestClient
utilizing HttpURLConnection
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
request
(String method, String path, technology.sola.json.JsonElement body, Consumer<HttpResponse> httpResponseSupplier) Creates and sends an HTTP request.
-
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. TheHttpResponse
from the server as provided in a callback.Note: body is ignored when method is "GET"
- Specified by:
request
in interfaceRestClient
- Parameters:
method
- the http method for the requestpath
- the path for the requestbody
- the request bodyhttpResponseSupplier
- the callback when the request finishes and the response is available
-