public interface HttpClientSpec
| Modifier and Type | Method and Description |
|---|---|
HttpClientSpec |
byteBufAllocator(ByteBufAllocator byteBufAllocator)
The buffer allocator to use.
|
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(Duration readTimeout)
The read timeout value for responses.
|
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(Duration readTimeout)
Defaults to 30 seconds.
readTimeout - the read timeout value for responsesthis