Interface RestClientsConfig
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionalpn()If the Application-Layer Protocol Negotiation is enabled, the client will negotiate which protocol to use over the protocols exposed by the server.booleanIftrue, the stacktrace of the invocation of the REST Client method is captured.clients()Configurations of REST client instances.The size of the connection pool for this client.The time in ms for which a connection remains unused in the connection pool before being evicted and closed.Deprecated.booleanIf true, the REST clients will not provide additional contextual information (like REST client class and method names) when exception occurs during a client invocation.Supports receiving compressed messages using GZIP.A boolean value used to determine whether the client should follow HTTP redirect responses.headers()The HTTP headers that should be applied to all requests of the rest client.The class name of the host name verifier.booleanhttp2()If this is true then HTTP/2 will be enabled.Optional<io.quarkus.runtime.configuration.MemorySize> Configures the HTTP/2 upgrade maximum length of the aggregated content in bytes.If set to false disables the keep alive completely.keyStore()The key store location.The key store password.The type of the key store.logging()Logging configuration.Optional<io.quarkus.runtime.configuration.MemorySize> Configures two different things: The max HTTP chunk size, up toInteger.MAX_VALUEbytes. The size of the chunk to be read when anInputStreamis being used as an inputThe maximum number of redirection a request can follow.Multipart configuration.Mode in which the form data are encoded.Deprecated.Fully-qualified provider classnames to include in the client.Deprecated.usequarkus.rest-client.proxy-configuration-nameinsteadThe name of the proxy configuration to use; ignored ifquarkus.rest-client.proxy-addressis set.Deprecated.usequarkus.rest-client.proxy-configuration-nameinsteadDeprecated.usequarkus.rest-client.proxy-configuration-nameinsteadDeprecated.usequarkus.rest-client.proxy-configuration-nameinsteadOptional<org.eclipse.microprofile.rest.client.ext.QueryParamStyle> An enumerated type string value with possible values of "MULTI_PAIRS" (default), "COMMA_SEPARATED", or "ARRAY_PAIRS" that specifies the format in which multiple values for the same query parameter is used.A timeout in milliseconds that REST clients should wait for a response from the remote endpoint.The name of the TLS configuration to use.The trust store location.The trust store password.The type of the trust store.Default configuration for the HTTP user-agent header to use in all REST clients.Set whether hostname verification is enabled.
-
Method Details
-
clients
@WithParentName @WithDefaults @WithKeys(RestClientKeysProvider.class) @ConfigDocMapKey("client") @WithKeys(RestClientKeysProvider.class) Map<String,RestClientsConfig.RestClientConfig> clients()Configurations of REST client instances.The key can be either the value of the configKey parameter of a `@RegisterRestClient` annotation, or the name of a class bearing that annotation, in which case it is possible to use the short name, as well as fully qualified name.
-
multipartPostEncoderMode
Mode in which the form data are encoded. Possible values are `HTML5`, `RFC1738` and `RFC3986`. The modes are described in the Netty documentationBy default, Rest Client Reactive uses RFC1738.
This property is not applicable to the RESTEasy Client.
-
proxyConfigurationName
The name of the proxy configuration to use; ignored ifquarkus.rest-client.proxy-addressis set.If not set and the default proxy configuration is configured (
quarkus.proxy.*) then that will be used. If the proxy configuration name is set, the configuration fromquarkus.proxy.<name>.*will be used. If the proxy configuration name is set, but no proxy configuration is found with that name, then an error will be thrown at runtime.Can be overwritten by client-specific settings.
Use the value
noneto disable using the default configuration defined viaquarkus.proxy.*.Quarkus RESTEasy client (provided by the quarkus-resteasy-client dependency) does not support this property.
-
proxyAddress
@Deprecated Optional<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> proxyAddress()Deprecated.usequarkus.rest-client.proxy-configuration-nameinsteadA string value in the form of `: ` that specifies the HTTP proxy server hostname (or IP address) and port for requests of clients to use. Can be overwritten by client-specific settings.
-
proxyUser
Deprecated.usequarkus.rest-client.proxy-configuration-nameinsteadProxy username, equivalent to the http.proxy or https.proxy JVM settings. Honored only ifquarkus.rest-client.proxy-addressis set.Can be overwritten by client-specific settings.
This property is not applicable to the RESTEasy Client.
-
proxyPassword
Deprecated.usequarkus.rest-client.proxy-configuration-nameinsteadProxy password, equivalent to the http.proxyPassword or https.proxyPassword JVM settings. Honored only ifquarkus.rest-client.proxy-addressis set.Can be overwritten by client-specific settings.
This property is not applicable to the RESTEasy Client.
-
nonProxyHosts
Deprecated.usequarkus.rest-client.proxy-configuration-nameinsteadHosts to access without proxy, similar to the http.nonProxyHosts or https.nonProxyHosts JVM settings. Please note that unlike the JVM settings, this property is empty by default. Honored only ifquarkus.rest-client.proxy-addressis set.Can be overwritten by client-specific settings.
This property is not applicable to the RESTEasy Client.
-
proxyConnectTimeout
Deprecated.usequarkus.rest-client.proxy-configuration-nameinsteadProxy connection timeout. Honored only ifquarkus.rest-client.proxy-addressis set.Can be overwritten by client-specific settings.
This property is not applicable to the RESTEasy Client.
-
connectTimeout
Deprecated.A timeout in milliseconds that REST clients should wait to connect to the remote endpoint.Can be overwritten by client-specific settings.
-
readTimeout
A timeout in milliseconds that REST clients should wait for a response from the remote endpoint.Can be overwritten by client-specific settings.
-
disableContextualErrorMessages
@WithDefault("false") boolean disableContextualErrorMessages()If true, the REST clients will not provide additional contextual information (like REST client class and method names) when exception occurs during a client invocation.This property is not applicable to the RESTEasy Client.
-
userAgent
Default configuration for the HTTP user-agent header to use in all REST clients.Can be overwritten by client-specific settings.
This property is not applicable to the RESTEasy Client.
-
headers
The HTTP headers that should be applied to all requests of the rest client. -
hostnameVerifier
The class name of the host name verifier. The class must have a public no-argument constructor.Can be overwritten by client-specific settings.
-
connectionTTL
OptionalInt connectionTTL()The time in ms for which a connection remains unused in the connection pool before being evicted and closed. A timeout of0means there is no timeout.Can be overwritten by client-specific settings.
-
connectionPoolSize
The size of the connection pool for this client.Can be overwritten by client-specific settings.
-
keepAliveEnabled
If set to false disables the keep alive completely.Can be overwritten by client-specific settings.
-
maxRedirects
OptionalInt maxRedirects()The maximum number of redirection a request can follow.Can be overwritten by client-specific settings.
This property is not applicable to the RESTEasy Client.
-
followRedirects
A boolean value used to determine whether the client should follow HTTP redirect responses.Can be overwritten by client-specific settings.
-
providers
Fully-qualified provider classnames to include in the client. The equivalent of the `@RegisterProvider` annotation.Can be overwritten by client-specific settings.
-
queryParamStyle
Optional<org.eclipse.microprofile.rest.client.ext.QueryParamStyle> queryParamStyle()An enumerated type string value with possible values of "MULTI_PAIRS" (default), "COMMA_SEPARATED", or "ARRAY_PAIRS" that specifies the format in which multiple values for the same query parameter is used.Can be overwritten by client-specific settings.
-
verifyHost
Set whether hostname verification is enabled. Default is enabled. This setting should not be disabled in production as it makes the client vulnerable to MITM attacks.Can be overwritten by client-specific settings.
-
trustStore
The trust store location. Can point to either a classpath resource or a file.Can be overwritten by client-specific settings.
-
trustStorePassword
The trust store password.Can be overwritten by client-specific settings.
-
trustStoreType
The type of the trust store. Defaults to "JKS".Can be overwritten by client-specific settings.
-
keyStore
The key store location. Can point to either a classpath resource or a file.Can be overwritten by client-specific settings.
-
keyStorePassword
The key store password.Can be overwritten by client-specific settings.
-
keyStoreType
The type of the key store. Defaults to "JKS".Can be overwritten by client-specific settings.
-
tlsConfigurationName
The name of the TLS configuration to use.If a name is configured, it uses the configuration from
quarkus.tls.<name>.*If a name is configured, but no TLS configuration is found with that name then an error will be thrown. The default TLS configuration will be ignored.If no named TLS configuration is set, then the key-store, trust-store, etc. properties will be used.
This property is not applicable to the RESTEasy Client.
-
http2
@WithDefault("false") boolean http2()If this is true then HTTP/2 will be enabled. -
http2UpgradeMaxContentLength
@ConfigDocDefault("64K") Optional<io.quarkus.runtime.configuration.MemorySize> http2UpgradeMaxContentLength()Configures the HTTP/2 upgrade maximum length of the aggregated content in bytes.This property is not applicable to the RESTEasy Client.
-
maxChunkSize
Configures two different things:- The max HTTP chunk size, up to
Integer.MAX_VALUEbytes. - The size of the chunk to be read when an
InputStreamis being used as an input
Can be overwritten by client-specific settings.
This property is not applicable to the RESTEasy Client.
- The max HTTP chunk size, up to
-
enableCompression
Supports receiving compressed messages using GZIP. When this feature is enabled and a server returns a response that includes the headerContent-Encoding: gzip, REST Client will automatically decode the content and proceed with the message handling.This property is not applicable to the RESTEasy Client.
Can be overwritten by client-specific settings.
-
alpn
If the Application-Layer Protocol Negotiation is enabled, the client will negotiate which protocol to use over the protocols exposed by the server. By default, it will try to use HTTP/2 first and if it's not enabled, it will use HTTP/1.1. When the property `http2` is enabled, this flag will be automatically enabled. -
captureStacktrace
@WithDefault("false") boolean captureStacktrace()Iftrue, the stacktrace of the invocation of the REST Client method is captured. This stacktrace will be used if the invocation throws an exception -
logging
Logging configuration. -
multipart
RestClientsConfig.RestClientMultipartConfig multipart()Multipart configuration. -
getClient
-
quarkus.rest-client.proxy-configuration-nameinstead