Resilient HTTP client over Finch with retries, jitter backoff, and Telemetry.
- Exponential backoff with full jitter on 429 / 5xx responses
- Respects
Retry-Afterheader Emits
[:gocardless, :request, :start | :stop | :exception]Telemetry events- Tracks
X-RateLimit-*headers viaGoCardlessClient.HTTP.RateLimiter
Summary
Functions
Executes an API request with automatic retries and backoff.
Types
@type method() :: :get | :post | :put | :patch | :delete
@type req_state() :: %{ config: GoCardlessClient.Config.t(), method: method(), url: String.t(), headers: [{String.t(), String.t()}], body: binary() | nil, remaining: non_neg_integer(), attempt: non_neg_integer() }
@type response() :: {:ok, map() | list() | nil} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Functions
@spec request(GoCardlessClient.Config.t(), method(), String.t(), keyword()) :: response()
Executes an API request with automatic retries and backoff.
Options
:body— request body map (JSON-encoded before sending):idempotency_key— setsIdempotency-Keyheader:request_id— setsX-Request-IDcorrelation header:access_token— overrides bearer token for this request only:signer— aGoCardlessClient.Signingstruct for request signing