Mimir.RouterClient.HTTP (Mimir v0.4.1)

Copy Markdown View Source

RouterClient implementation that calls POST /v1/route over HTTP via Req.

Options

  • :base_url (required) — e.g. "https://gateway.example.com".
  • :bearer_token (required) — the caller's bearer token.
  • :plug (optional) — a plug (module or function) handling the request in-process instead of a live HTTP call — the Req.Test seam; used by this library's own tests and smoke task.

Response normalization

The JSON response (string keys) is parsed into a %Mimir.RouteResponse{} by Mimir.RouteResponse.new/1 — the single struct boundary; this client performs no key atomization of its own.