BankingCircle.HTTP.Client (banking_circle v1.0.0)

Copy Markdown View Source

Builds the shared Req request pipeline used by every resource module (BankingCircle.Payments, BankingCircle.Accounts, ...), and exposes request/2 as the single choke point through which all API traffic flows — this is where auth injection, retries, telemetry, and error normalization all compose.

Summary

Functions

Issues a request through the shared pipeline: attaches a fresh/cached bearer token, emits [:banking_circle, :request, :start | :stop | :exception] telemetry, and normalizes any failure into BankingCircle.Error.

Functions

build(config)

request(base_request, opts)

@spec request(
  Req.Request.t(),
  keyword()
) :: {:ok, term()} | {:error, BankingCircle.Error.t()}

Issues a request through the shared pipeline: attaches a fresh/cached bearer token, emits [:banking_circle, :request, :start | :stop | :exception] telemetry, and normalizes any failure into BankingCircle.Error.

Returns {:ok, decoded_body} on 2xx, {:error, %BankingCircle.Error{}} otherwise.