ClientSettings
Defines HTTP client settings.
ClientSettings
is a mutable structure. With each applied change, the
settings are modified and returned. After applying the desired settings, a
client is created using a factory method.
Default Settings
Key | Value |
---|---|
accept | * /* |
acceptEncodings | Nil |
bufferSize | 8192 |
readTimeout | 30000 |
continueTimeout | 1000 |
keepAlive | false |
coookies | CookieStore.Null |
trust | (Not set) |
incoming | (Not set) |
outgoing | (Not set) |
- Constructor
Creates client settings.
Value members
Concrete methods
Sets accepted content types.
Sets accepted content types.
The Accept header for each outgoing request is set accordingly.
Sets accepted content types.
Sets accepted content types.
The Accept header for each outgoing request is set accordingly.
Sets accepted content encodings.
Sets accepted content encodings.
The Accept-Encoding header for each outgoing request is set accordingly.
Sets accepted content encodings.
Sets accepted content encodings.
The Accept-Encoding header for each outgoing request is set accordingly.
Sets buffer size.
Sets buffer size.
The buffer size specifies the size in bytes of client socket's send and receive buffers.
Sets continue timeout.
Sets continue timeout.
The continue timeout specifies how many milliseconds to wait for a 100 (Continue) response before sending the request body.
- Note
This applies only to requests that include an Except header set to 100-Continue.
Sets read timeout.
Sets read timeout.
The read timeout specifies how many milliseconds a read from client socket
blocks before it times out, whereafter SocketTimeoutException
is thrown.
Sets truststore.
Sets truststore.
- Value Params
- password
store password
- storeType
store type (e.g., JKS or PKCS12)
- truststore
truststore used for HTTPS connections