Skip to content
GitHub

Configuration

Config section: http
Env prefix: LEX_HTTP__
Config model: HTTPClientConfig

KeyTypeDefaultEnv varDescription
poolConnectionPoolConfigLEX_HTTP__POOL__*Connection pool settings
proxystr | NoneNoneLEX_HTTP__PROXYHTTP/HTTPS proxy URL
trust_envboolTrueLEX_HTTP__TRUST_ENVRead proxy from env vars
cookie_jarboolTrueLEX_HTTP__COOKIE_JAREnable in-memory cookie jar
KeyTypeDefaultEnv varDescription
max_connectionsint10LEX_HTTP__POOL__MAX_CONNECTIONSTotal concurrent connections
max_keepalive_connectionsint5LEX_HTTP__POOL__MAX_KEEPALIVE_CONNECTIONSKeep-alive per host
max_connections_per_hostint10LEX_HTTP__POOL__MAX_CONNECTIONS_PER_HOSTMax per host
timeoutfloat30.0LEX_HTTP__POOL__TIMEOUTRequest timeout (seconds)
ttl_dns_cacheint300LEX_HTTP__POOL__TTL_DNS_CACHEDNS cache TTL (seconds)
force_closeboolFalseLEX_HTTP__POOL__FORCE_CLOSEForce-close connections after use
http:
pool:
max_connections: 50
max_keepalive_connections: 20
timeout: 10.0
ttl_dns_cache: 60
proxy: http://proxy.example.com:8080
trust_env: true
cookie_jar: true

Env var override form:

Terminal window
export LEX_HTTP__POOL__TIMEOUT=5.0
export LEX_HTTP__POOL__MAX_CONNECTIONS=100
export LEX_HTTP__PROXY=http://proxy.internal:8080