Req-based HTTP transport. Retries GET on transient errors; no retry for mutating verbs.
Summary
Types
Result of an API call. {:ok, ...} carries the HTTP status and the parsed
JSON body (a map, a list, or nil for empty bodies). {:error, reason} is
returned for transport-level failures (timeouts, connection errors).
Functions
DELETE request.
GET request with optional query params and per-call opts (e.g. access_token:).
POST request. Omit body or pass nil to send no body.
PUT request.
Types
@type response() :: {:ok, %{status: non_neg_integer(), response: map() | list() | nil}} | {:error, term()}
Result of an API call. {:ok, ...} carries the HTTP status and the parsed
JSON body (a map, a list, or nil for empty bodies). {:error, reason} is
returned for transport-level failures (timeouts, connection errors).
Functions
@spec delete(Mercadopago.Client.t(), String.t(), keyword()) :: response()
DELETE request.
@spec get(Mercadopago.Client.t(), String.t(), map() | nil, keyword()) :: response()
GET request with optional query params and per-call opts (e.g. access_token:).
@spec post(Mercadopago.Client.t(), String.t(), map() | nil, keyword()) :: response()
POST request. Omit body or pass nil to send no body.
@spec put(Mercadopago.Client.t(), String.t(), map() | nil, keyword()) :: response()
PUT request.