Package | Description |
---|---|
ratpack.http.client |
The HTTP client.
|
ratpack.sse |
Support for Server Sent Events.
|
ratpack.test.http |
Modifier and Type | Method and Description |
---|---|
default RequestSpec |
RequestSpec.basicAuth(String username,
String password)
Adds the appropriate header for HTTP Basic authentication with the given username and password.
|
RequestSpec |
RequestSpec.body(Action<? super RequestSpec.Body> action)
Executes the given action with the
request body . |
RequestSpec |
RequestSpec.decompressResponse(boolean shouldDecompress)
Enables automatic decompression of the response.
|
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) |
default RequestSpec |
RequestSpec.sslContext(Factory<SSLContext> factory)
Factory method to create
SSLContext used for client and server SSL authentication. |
RequestSpec |
RequestSpec.sslContext(SSLContext sslContext)
Sets the
SSLContext used for client and server SSL authentication. |
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 |
---|---|
Promise<TransformablePublisher<Event<?>>> |
ServerSentEventStreamClient.request(URI uri,
Action<? super RequestSpec> action) |
Modifier and Type | Method and Description |
---|---|
TestHttpClient |
TestHttpClient.requestSpec(Action<? super RequestSpec> requestAction) |
static TestHttpClient |
TestHttpClient.testHttpClient(ApplicationUnderTest applicationUnderTest,
Action<? super RequestSpec> requestConfigurer)
A method to create an instance of the default implementation of TestHttpClient.
|