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 |
resolveTo | (Not set) |
trust | (Not set) |
incoming | (Not set) |
outgoing | (Not set) |
Attributes
- Constructor
-
Creates client settings.
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Sets accepted content types.
Sets accepted content types.
The Accept header for each outgoing request is set accordingly.
Attributes
Sets accepted content types.
Sets accepted content types.
The Accept header for each outgoing request is set accordingly.
Attributes
Sets accepted content encodings.
Sets accepted content encodings.
The Accept-Encoding header for each outgoing request is set accordingly.
Attributes
Sets accepted content encodings.
Sets accepted content encodings.
The Accept-Encoding header for each outgoing request is set accordingly.
Attributes
Sets buffer size.
Sets buffer size.
The buffer size specifies the size in bytes of client socket's send and receive buffers.
Attributes
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.
Attributes
- Note
-
This applies only to requests that include an Except header set to 100-Continue.
Sets cookie store.
Sets cookie store.
Value parameters
- cookies
-
cookie store
Attributes
Adds supplied response filter.
Adds supplied response filter.
Attributes
Enables or disables persistent connections.
Enables or disables persistent connections.
Attributes
Adds supplied request filter.
Adds supplied request filter.
Attributes
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.
Attributes
Resets to default settings.
Resets to default settings.
Attributes
Sets authority to which relative targets are resolved.
Sets authority to which relative targets are resolved.
Value parameters
- secure
-
use https and wss schemes
Attributes
Sets host and port to which relative targets are resolved.
Sets host and port to which relative targets are resolved.
Value parameters
- secure
-
use https and wss schemes
Attributes
Sets host and port to which relative targets are resolved.
Sets host and port to which relative targets are resolved.
Value parameters
- secure
-
use https and wss schemes
Attributes
Creates client using current settings.
Creates client using current settings.
Attributes
Sets truststore.
Sets truststore.
Value parameters
- password
-
store password
- storeType
-
store type (e.g., JKS or PKCS12)
- truststore
-
truststore used for HTTPS connections
Attributes
Sets trust manager.
Sets trust manager.
Value parameters
- manager
-
trust manager used for HTTPS connections