# `Rapyd.HTTP.Client`
[🔗](https://github.com/iamkanishka/rapyd/blob/v1.0.0/lib/rapyd/http/client.ex#L1)

Default HTTP transport for the Rapyd SDK.

Responsibilities:
* Attaches Rapyd HMAC-SHA256 auth headers to every request
* Encodes request bodies as JSON
* Decodes and validates Rapyd response envelopes
* Implements full-jitter exponential backoff on retryable failures
* Enforces a configurable per-request timeout

This module implements the `Rapyd.HTTP.Behaviour` contract, making it
trivially swappable for test doubles via `Mox`.

# `request`

```elixir
@spec request(Rapyd.Client.t(), atom(), String.t(), map() | nil, keyword()) ::
  {:ok, term()} | {:error, Rapyd.Error.t()}
```

Execute a signed API request with automatic retry.

`path` must start with `/`, e.g. `"/v1/payments"`.
`body` is any JSON-serialisable term, or `nil` for requests without a body.

Returns `{:ok, decoded_data}` where `decoded_data` is the `"data"` field
from the Rapyd response envelope, or `{:error, %Rapyd.Error{}}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
