This is a standalone configuration type, prefix from configuration root: clients
Configuration options
| key | type | default value | description |
|---|---|---|---|
|
ClientUri |
|
Base uri used by the client in all requests. |
|
Duration |
|
Connect timeout. See io.helidon.common.socket.SocketOptions.connectTimeout() |
|
int |
|
Maximal size of the connection cache. For most HTTP protocols, we may cache connections to various endpoints for keep alive (or stream reuse in case of HTTP/2). This option limits the size. Setting this number lower than the "usual" number of target services will cause connections to be closed and reopened frequently. |
|
|
Configure the listener specific io.helidon.http.encoding.ContentEncodingContext. This method discards all previously registered ContentEncodingContext. If no content encoding context is registered, default encoding context is used. |
|
|
|
WebClient cookie manager. |
|
|
Map<string, string> |
|
Default headers to be used in every request from configuration. |
|
boolean |
|
Whether to follow redirects. |
|
boolean |
|
Determines if connection keep alive is enabled (NOT socket keep alive, but HTTP connection keep alive, to re-use the same connection for multiple requests). See io.helidon.common.socket.SocketOptions.socketKeepAlive() |
|
int |
|
If the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance. If bigger, streaming will be used. Note that for some entity types we cannot use streaming, as they are already fully in memory (String, byte[]), for such cases, this option is ignored. Default is 128Kb. |
|
int |
|
Max number of followed redirects.
This is ignored if followRedirects() option is |
|
|
Configure the listener specific io.helidon.http.media.MediaContext. This method discards all previously registered MediaContext. If no media context is registered, default media context is used. |
|
|
ParserMode (STRICT, RELAXED) |
|
Configure media type parsing mode for HTTP |
|
Map<string, string> |
|
Properties configured for this client. These properties are propagated through client request, to be used by services (and possibly for other purposes). |
|
io.helidon.webclient.spi.ProtocolConfig[] (service provider interface) |
|
Configuration of client protocols. |
|
string[] |
|
List of HTTP protocol IDs by order of preference. If left empty, all discovered providers will be used, ordered by weight. For example if both HTTP/2 and HTTP/1.1 providers are available (considering HTTP/2 has higher weights), for ALPN we will send h2 and http/1.1 and decide based on response. If TLS is not used, we would attempt an upgrade (or use prior knowledge if configured in protocolConfigs()). |
|
|
Proxy configuration to be used for requests. |
|
|
Duration |
|
Socket 100-Continue read timeout. Default is 1 second. This read timeout is used when 100-Continue is sent by the client, before it sends an entity. |
|
Duration |
|
Read timeout. See io.helidon.common.socket.SocketOptions.readTimeout() |
|
boolean |
|
Can be set to |
|
boolean |
|
Whether Expect-100-Continue header is sent to verify server availability before sending an entity. Defaults to |
|
io.helidon.webclient.spi.WebClientService[] (service provider interface) |
|
WebClient services. |
|
boolean |
|
Whether to share connection cache between all the WebClient instances in JVM. |
|
|
Socket options for connections opened by this client. If there is a value explicitly configured on this type and on the socket options, the one configured on this type’s builder will win:
|
|
|
|
TLS configuration for any TLS request from this client.
TLS can also be configured per request.
TLS is used when the protocol is set to |
|
|
int |
|
Buffer size used when writing data to the underlying socket on a client TCP connection. A value that is less or equal to 1 can be set to disable buffering at this level. Note that if writing data to the socket in small chunks, they may not be delivered to the network immediately due to Nagle’s algorithm (i.e., if TCP_NO_DELAY is turned off). |