4. Transports and Clients

httpClientConfig

Configuration container for Membrane's HTTP client. Allows defining proxy, connection, authentication, TLS, and retry behavior. Can be used as a reusable bean and referenced via . Most of its sub-elements are optional. Example XML: <httpClientConfig maxRetries="5" adjustHostHeader="true"> <connection timeout="10000"/> <proxy host="proxy.example.com" port="3128"/> <authentication type="basic" user="user" password="pass"/> <ssl keystoreLocation="classpath:client.jks" keystorePassword="secret"/> </httpClientConfig> YAML: httpClientConfig: maxRetries: 5 adjustHostHeader: true connection: timeout: 10000 proxy: host: proxy.example.com port: 3128 authentication: type: basic user: user password: pass ssl: keystoreLocation: classpath:client.jks keystorePassword: secret

Can be used in:

balancerHealthMonitor, httpClient, acme, registration, router and bean

Attributes

NameRequiredDefaultDescriptionExample
useExperimentalHttp2 false false
Enables experimental support for HTTP/2. When true, HTTP/2 connections are attempted when possible.
-
maxRetries false 2
Total number of connection attempts before giving up. This includes the first attempt, so 5 means 1 try + 4 retries. Used for failover and load balancing logic.
3
adjustHostHeader false true
Whether to automatically rewrite the Host header to match the target address. This is useful when routing requests to internal systems where the Host header must match the backend.
-

Child Elements

ElementsDescriptionCardinality
retries Advanced configuration for retry behavior. Allows detailed retry logic beyond the simple maxRetries setting. 0..1
connection Connection-related configuration such as timeouts and connection pooling. Cannot be null. 0..1
proxy Optional proxy configuration for outbound connections. 0..1
authentication Optional authentication mechanism (e.g., basic auth). 0..1
ssl SSL/TLS configuration for secure connections. Accepts both standard and external SSL configurations. 0..1