Package | Description |
---|---|
ratpack.http.client |
The HTTP client.
|
Modifier and Type | Method and Description |
---|---|
HttpClientSpec |
HttpClientSpec.byteBufAllocator(io.netty.buffer.ByteBufAllocator byteBufAllocator)
The buffer allocator to use.
|
HttpClientSpec |
HttpClientSpec.connectTimeout(java.time.Duration connectTimeout)
The connect timeout value for requests.
|
HttpClientSpec |
HttpClientSpec.enableMetricsCollection(boolean enableMetricsCollection)
Enable metric collection on HTTP Client.
|
HttpClientSpec |
HttpClientSpec.errorIntercept(Action<? super java.lang.Throwable> interceptor)
Add an interceptor for errors thrown by this client (eg.
|
HttpClientSpec |
HttpClientSpec.idleTimeout(java.time.Duration idleTimeout)
The default amount of time to allow a connection to remain idle in the connection pool.
|
HttpClientSpec |
HttpClientSpec.maxContentLength(int maxContentLength)
The maximum size to allow for responses.
|
HttpClientSpec |
HttpClientSpec.poolQueueSize(int poolQueueSize)
The maximum number of requests that will be queued if connection pool was depleted.
|
HttpClientSpec |
HttpClientSpec.poolSize(int poolSize)
The maximum number of connections to maintain to a given protocol/host/port.
|
HttpClientSpec |
HttpClientSpec.readTimeout(java.time.Duration readTimeout)
The read timeout value for responses.
|
HttpClientSpec |
HttpClientSpec.requestIntercept(Action<? super RequestSpec> interceptor)
Add an interceptor for all requests handled by this client.
|
HttpClientSpec |
HttpClientSpec.responseIntercept(Action<? super HttpResponse> interceptor)
Add an interceptor for all responses returned by this client.
|
HttpClientSpec |
HttpClientSpec.responseIntercept(Operation operation)
Execute the provide
Operation for all responses returned by this client. |
HttpClientSpec |
HttpClientSpec.responseMaxChunkSize(int numBytes)
The max size of the chunks to emit when reading a response as a stream.
|
Modifier and Type | Method and Description |
---|---|
HttpClient |
HttpClient.copyWith(Action<? super HttpClientSpec> action)
Create a new HttpClient by appending the provided configuration to this client.
|
static HttpClient |
HttpClient.of(Action<? super HttpClientSpec> action)
Creates a new HTTP client.
|