Internal HTTP client for all Paysafe API calls.
Handles:
- Base64 Basic Auth header construction
- JSON serialisation/deserialisation
- Exponential backoff retry on transient errors
- Token-bucket rate limiting
- Telemetry span emission
Unified
{:ok, body} | {:error, %Error{}}return type
Summary
Functions
Perform a DELETE request.
Perform a GET request.
Perform a PATCH request with a JSON body.
Perform a POST request with a JSON body.
Perform a PUT request with a JSON body.
Types
@type method() :: :get | :post | :put | :patch | :delete
@type result() :: {:ok, map() | list()} | {:error, Paysafe.Error.t()}
Functions
@spec delete(Paysafe.Config.t(), atom(), String.t(), keyword()) :: result()
Perform a DELETE request.
@spec get(Paysafe.Config.t(), atom(), String.t(), keyword()) :: result()
Perform a GET request.
Perform a PATCH request with a JSON body.
Perform a POST request with a JSON body.
Perform a PUT request with a JSON body.