This is a standalone configuration type, prefix from configuration root: clients

Configuration options

Table 1. Optional configuration options
key type default value description

base-uri

ClientUri

 

Base uri used by the client in all requests.

connect-timeout

Duration

 

Connect timeout.

See io.helidon.common.socket.SocketOptions.connectTimeout()

connection-cache-size

int

256

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.

content-encoding

 

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.

cookie-manager

 

WebClient cookie manager.

default-headers

Map<string, string>

 

Default headers to be used in every request from configuration.

follow-redirects

boolean

true

Whether to follow redirects.

keep-alive

boolean

true

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()

max-in-memory-entity

int

131072

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.

max-redirects

int

10

Max number of followed redirects. This is ignored if followRedirects() option is false.

media-context

create()

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.

media-type-parser-mode

ParserMode (STRICT, RELAXED)

ParserMode.STRICT

Configure media type parsing mode for HTTP Content-Type header.

properties

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).

protocol-configs

io.helidon.webclient.spi.ProtocolConfig[] (service provider interface)

 

Configuration of client protocols.

protocol-preference

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

 

Proxy configuration to be used for requests.

read-continue-timeout

Duration

PT1S

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.

read-timeout

Duration

 

Read timeout.

See io.helidon.common.socket.SocketOptions.readTimeout()

relative-uris

boolean

false

Can be set to true to force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.

send-expect-continue

boolean

true

Whether Expect-100-Continue header is sent to verify server availability before sending an entity.

Defaults to true.

services

io.helidon.webclient.spi.WebClientService[] (service provider interface)

 

WebClient services.

share-connection-cache

boolean

true

Whether to share connection cache between all the WebClient instances in JVM.

socket-options

 

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:

  • readTimeout()

  • connectTimeout()

tls

Tls

 

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 https.

write-buffer-size

int

4096

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).