public interface HttpClientSpec
| Modifier and Type | Method and Description |
|---|---|
HttpClientSpec |
byteBufAllocator(ByteBufAllocator byteBufAllocator)
The buffer allocator to use.
|
HttpClientSpec |
connectTimeout(java.time.Duration connectTimeout)
The read timeout value for responses.
|
HttpClientSpec |
maxContentLength(int maxContentLength)
The maximum size to allow for responses.
|
HttpClientSpec |
poolSize(int poolSize)
The maximum number of connections to maintain to a given protocol/host/port.
|
HttpClientSpec |
readTimeout(java.time.Duration readTimeout)
The read timeout value for responses.
|
HttpClientSpec |
responseMaxChunkSize(int numBytes)
The max size of the chunks to emit when reading a response as a stream.
|
HttpClientSpec byteBufAllocator(ByteBufAllocator byteBufAllocator)
Defaults to PooledByteBufAllocator.DEFAULT.
byteBufAllocator - the buffer allocatorthisHttpClientSpec poolSize(int poolSize)
Defaults to 0.
Setting this number to > 0 enables connection pooling (a.k.a. HTTP Keep Alive).
The given value dictates the number of connections to a given target, not the overall size.
Calling HttpClient.close() will close all current connections.
poolSize - the connection pool sizethisHttpClientSpec maxContentLength(int maxContentLength)
Defaults to ServerConfig.DEFAULT_MAX_CONTENT_LENGTH.
maxContentLength - the maximum response content lengththisHttpClientSpec readTimeout(java.time.Duration readTimeout)
Defaults to 30 seconds.
readTimeout - the read timeout value for responsesthisHttpClientSpec connectTimeout(java.time.Duration connectTimeout)
Defaults to 30 seconds.
connectTimeout - the read timeout value for responsesthisHttpClientSpec responseMaxChunkSize(int numBytes)
Defaults to 8192.
Increasing this value can increase throughput at the expense of memory use.
numBytes - the max number of bytes to emitthis