- HttpClientConfig (webclient.api) Configuration
Configuration options
| key | type | default value | description |
|---|---|---|---|
base-uri | string | Base uri used by the client in all requests. @return base uri of the client requests | |
connect-timeout | Duration | Connect timeout. @return 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. @return content encoding context | ||
cookie-manager | WebClient cookie manager. @return cookie manager to use | ||
default-headers | Map<string, string> | Default headers to be used in every request from configuration. @return default headers | |
follow-redirects | boolean | true | Whether to follow redirects. @return 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). @return keep alive for this connection @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. @return maximal number of bytes to buffer in memory for supported writers |
max-redirects | int | 10 | Max number of followed redirects. This is ignored if #followRedirects() option is @return max number of followed redirects |
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. @return media context | |
media-type-parser-mode | ParserMode (STRICT, RELAXED) | STRICT | Configure media type parsing mode for HTTP @return media type parsing mode |
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). @return map of client properties | |
proxy | Proxy configuration to be used for requests. @return proxy to use, defaults to Proxy#noProxy() | ||
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. @return read 100-Continue timeout duration |
read-timeout | Duration | Read timeout. @return read timeout @see io.helidon.common.socket.SocketOptions#readTimeout() | |
relative-uris | boolean | false | Can be set to @return relative URIs flag |
send-expect-continue | boolean | true | Whether Expect-100-Continue header is sent to verify server availability before sending an entity. Defaults to `true`. @return whether Expect:100-Continue header should be sent on streamed transfers |
services | io.helidon.webclient.spi.WebClientService[] (service provider interface) | WebClient services. @return services to use with this web client | |
share-connection-cache | boolean | true | Whether to share connection cache between all the WebClient instances in JVM. @return true if connection cache is shared |
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:
@return socket options | ||
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 @return TLS configuration to use |