Uses of Interface
ratpack.http.client.RequestSpec
-
Packages that use RequestSpec Package Description ratpack.http.client The HTTP client.ratpack.sse Support for Server Sent Events.ratpack.sse.client ratpack.test.http Test fixtures that provide HTTP client interfaces to applications under test. -
-
Uses of RequestSpec in ratpack.http.client
Methods in ratpack.http.client that return RequestSpec Modifier and Type Method Description default RequestSpecRequestSpec. basicAuth(java.lang.String username, java.lang.String password)Adds the appropriate header for HTTP Basic authentication with the given username and password.RequestSpecRequestSpec. body(Action<? super RequestSpec.Body> action)Executes the given action with therequest body.RequestSpecRequestSpec. connectTimeout(java.time.Duration duration)Sets the socket connection timeout.default RequestSpecRequestSpec. connectTimeoutSeconds(int seconds)Deprecated.since 1.4, useconnectTimeout(Duration)RequestSpecRequestSpec. decompressResponse(boolean shouldDecompress)Enables automatic decompression of the response.default RequestSpecRequestSpec. delete()Specifies to use the DELETE request method.default RequestSpecRequestSpec. get()Specifies to use the GET request method.default RequestSpecRequestSpec. head()Specifies to use the HEAD request method.RequestSpecRequestSpec. headers(Action<? super MutableHeaders> action)This method can be used to buffer changes to the headers.RequestSpecRequestSpec. maxContentLength(int numBytes)The maximum response length to accept.default RequestSpecRequestSpec. method(java.lang.String method)Specifies the request method.RequestSpecRequestSpec. method(HttpMethod method)Specifies the request method.RequestSpecRequestSpec. onRedirect(Function<? super ReceivedResponse,Action<? super RequestSpec>> function)Specifies a function to invoke when a redirectable response is received.default RequestSpecRequestSpec. options()Specifies to use the OPTIONS request method.default RequestSpecRequestSpec. patch()Specifies to use the PATCH request method.default RequestSpecRequestSpec. post()Specifies to use the POST request method.default RequestSpecRequestSpec. put()Specifies to use the PUT request method.RequestSpecRequestSpec. readTimeout(java.time.Duration duration)Sets the socket read timeout.default RequestSpecRequestSpec. readTimeoutSeconds(int seconds)Deprecated.since 1.4, usereadTimeout(Duration)RequestSpecRequestSpec. redirects(int maxRedirects)The maximum number of redirects to automatically follow, before simply returning the redirect response.RequestSpecRequestSpec. responseMaxChunkSize(int numBytes)The max size of the chunks to emit when reading a response as a stream.RequestSpecRequestSpec. sslContext(io.netty.handler.ssl.SslContext sslContext)Sets theSslContextused for client and server SSL authentication.RequestSpecRequestSpec. sslContext(javax.net.ssl.SSLContext sslContext)Deprecated.since 1.5, usesslContext(SslContext)default RequestSpecRequestSpec. sslContext(Factory<javax.net.ssl.SSLContext> factory)Deprecated.since 1.5, no replacement.Method parameters in ratpack.http.client with type arguments of type RequestSpec Modifier and Type Method Description Promise<ReceivedResponse>HttpClient. get(java.net.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.RequestSpecRequestSpec. onRedirect(Function<? super ReceivedResponse,Action<? super RequestSpec>> function)Specifies a function to invoke when a redirectable response is received.Promise<ReceivedResponse>HttpClient. post(java.net.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(java.net.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.HttpClientSpecHttpClientSpec. requestIntercept(Action<? super RequestSpec> interceptor)Add an interceptor for all requests handled by this client.Promise<StreamedResponse>HttpClient. requestStream(java.net.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.sse
Method parameters in ratpack.sse with type arguments of type RequestSpec Modifier and Type Method Description Promise<TransformablePublisher<Event<?>>>ServerSentEventStreamClient. request(java.net.URI uri, Action<? super RequestSpec> action)Deprecated.since 1.10, useServerSentEventClient. -
Uses of RequestSpec in ratpack.sse.client
Method parameters in ratpack.sse.client with type arguments of type RequestSpec Modifier and Type Method Description Promise<ServerSentEventResponse>ServerSentEventClient. request(java.net.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 ReceivedResponseTestHttpClient. request(java.lang.String path, Action<? super RequestSpec> requestAction)Executes the request as specified by the providedRequestSpecagainst the provided path.ReceivedResponseTestHttpClient. request(Action<? super RequestSpec> requestAction)Executes the request as specified by the providedRequestSpec.TestHttpClientTestHttpClient. requestSpec(Action<? super RequestSpec> requestAction)static TestHttpClientTestHttpClient. testHttpClient(ApplicationUnderTest applicationUnderTest, Action<? super RequestSpec> requestConfigurer)A method to create an instance of the default implementation of TestHttpClient.
-