Uses of Interface
ratpack.core.http.client.RequestSpec
-
Packages that use RequestSpec Package Description ratpack.core.http.client The HTTP client.ratpack.core.sse.client ratpack.test.http Test fixtures that provide HTTP client interfaces to applications under test. -
-
Uses of RequestSpec in ratpack.core.http.client
Methods in ratpack.core.http.client that return RequestSpec Modifier and Type Method 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 therequest body
.RequestSpec
RequestSpec. connectTimeout(Duration duration)
Sets the socket connection timeout.RequestSpec
RequestSpec. decompressResponse(boolean shouldDecompress)
Enables automatic decompression of the response.default RequestSpec
RequestSpec. delete()
Specifies to use the DELETE request method.default RequestSpec
RequestSpec. get()
Specifies to use the GET request method.default RequestSpec
RequestSpec. head()
Specifies to use the HEAD request method.RequestSpec
RequestSpec. headers(Action<? super MutableHeaders> action)
This method can be used to buffer changes to the headers.RequestSpec
RequestSpec. maxContentLength(int numBytes)
The maximum response length to accept.default RequestSpec
RequestSpec. method(String method)
Specifies the request method.RequestSpec
RequestSpec. method(HttpMethod method)
Specifies the request method.RequestSpec
RequestSpec. onRedirect(Function<? super ReceivedResponse,Action<? super RequestSpec>> function)
Specifies a function to invoke when a redirectable response is received.default RequestSpec
RequestSpec. options()
Specifies to use the OPTIONS request method.default RequestSpec
RequestSpec. patch()
Specifies to use the PATCH request method.default RequestSpec
RequestSpec. post()
Specifies to use the POST request method.default RequestSpec
RequestSpec. put()
Specifies to use the PUT request method.RequestSpec
RequestSpec. readTimeout(Duration duration)
Sets the socket read timeout.RequestSpec
RequestSpec. redirects(int maxRedirects)
The maximum number of redirects to automatically follow, before simply returning the redirect response.RequestSpec
RequestSpec. responseMaxChunkSize(int numBytes)
The max size of the chunks to emit when reading a response as a stream.RequestSpec
RequestSpec. sslContext(io.netty.handler.ssl.SslContext sslContext)
Sets theSslContext
used for client and server SSL authentication.RequestSpec
RequestSpec. sslParams(Action<? super SSLParameters> action)
Sets additional configuration, such as SNI names, for the TLS/SSL connection to the server.Method parameters in ratpack.core.http.client with type arguments of type RequestSpec Modifier and Type Method 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.RequestSpec
RequestSpec. onRedirect(Function<? super ReceivedResponse,Action<? super RequestSpec>> function)
Specifies a function to invoke when a redirectable response is received.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.HttpClientSpec
HttpClientSpec. requestIntercept(Action<? super RequestSpec> interceptor)
Add an interceptor for all requests handled by this client.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. -
Uses of RequestSpec in ratpack.core.sse.client
Method parameters in ratpack.core.sse.client with type arguments of type RequestSpec Modifier and Type Method Description Promise<ServerSentEventResponse>
ServerSentEventClient. request(URI uri, Action<? super RequestSpec> action)
Makes a request for an event stream to the given location. -
Uses of RequestSpec in ratpack.test.http
Method parameters in ratpack.test.http with type arguments of type RequestSpec Modifier and Type Method Description ReceivedResponse
TestHttpClient. request(String path, Action<? super RequestSpec> requestAction)
Executes the request as specified by the providedRequestSpec
against the provided path.ReceivedResponse
TestHttpClient. request(Action<? super RequestSpec> requestAction)
Executes the request as specified by the providedRequestSpec
.TestHttpClient
TestHttpClient. requestSpec(Action<? super RequestSpec> requestAction)
Configure the settings for outgoing requests from this client.static TestHttpClient
TestHttpClient. testHttpClient(ApplicationUnderTest applicationUnderTest, Action<? super RequestSpec> requestConfigurer)
A method to create an instance of the default implementation of TestHttpClient.
-