public interface HttpClient
Modifier and Type | Method and Description |
---|---|
default Promise<ReceivedResponse> |
get(URI uri) |
Promise<ReceivedResponse> |
get(URI uri,
Action<? super RequestSpec> action)
An asynchronous method to do a GET HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec, but the method will be defaulted to a GET.
|
Promise<ReceivedResponse> |
post(URI uri,
Action<? super RequestSpec> action)
An asynchronous method to do a POST HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec, but the method will be defaulted to a POST.
|
Promise<ReceivedResponse> |
request(URI uri,
Action<? super RequestSpec> action)
An asynchronous method to do a HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec.
|
Promise<ReceivedResponse> get(URI uri, Action<? super RequestSpec> action)
uri
- the request URL (as a URI), must be of the http
or https
protocolaction
- An action that will act on the RequestSpec
ReceivedResponse
default Promise<ReceivedResponse> get(URI uri)
Promise<ReceivedResponse> post(URI uri, Action<? super RequestSpec> action)
uri
- the request URL (as a URI), must be of the http
or https
protocolaction
- An action that will act on the RequestSpec
ReceivedResponse
Promise<ReceivedResponse> request(URI uri, Action<? super RequestSpec> action)
uri
- the request URL (as a URI), must be of the http
or https
protocolaction
- An action that will act on the RequestSpec
ReceivedResponse