Package | Description |
---|---|
ratpack.http.client | |
ratpack.test.http |
Modifier and Type | Method and Description |
---|---|
RequestSpec |
RequestSpec.body(Action<? super RequestSpec.Body> action)
Executes the given action with the
request body . |
RequestSpec |
RequestSpec.headers(Action<? super MutableHeaders> action)
This method can be used to compose changes to the headers.
|
RequestSpec |
RequestSpec.method(String method)
Set the HTTP verb to use.
|
RequestSpec |
RequestSpec.readTimeout(Duration duration) |
default RequestSpec |
RequestSpec.readTimeoutSeconds(int seconds) |
RequestSpec |
RequestSpec.redirects(int maxRedirects) |
Modifier and Type | Method and Description |
---|---|
Promise<ReceivedResponse> |
HttpClient.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> |
HttpClient.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> |
HttpClient.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<StreamedResponse> |
HttpClient.requestStream(URI uri,
Action<? super RequestSpec> requestConfigurer)
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,
the received response content will be streamed.
|
Modifier and Type | Method and Description |
---|---|
TestHttpClient |
TestHttpClient.requestSpec(Action<? super RequestSpec> requestAction) |
static TestHttpClient |
TestHttpClients.testHttpClient(ApplicationUnderTest applicationUnderTest,
Action<? super RequestSpec> requestConfigurer) |