2026-09-05 08:12:30 +03:30
|
|
|
import httpx
|
|
|
|
|
|
|
|
|
|
from .settings import settings
|
|
|
|
|
|
|
|
|
|
|
2026-10-13 19:48:27 +03:30
|
|
|
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)
|