Files
LedgerLine/common/http.py
T

11 lines
393 B
Python
Raw Normal View History

import httpx
from .settings import settings
def downstream_client() -> httpx.AsyncClient:
"""An httpx.AsyncClient preconfigured with the 3s downstream timeout.
Correlation travels as W3C `traceparent`, injected by the httpx
instrumentation (common/telemetry.py) -- it replaced Phase 0's X-Request-Id."""
return httpx.AsyncClient(timeout=settings.downstream_timeout_seconds)