# `BambooHR.HTTPClient.Req`
[🔗](https://github.com/sgerrand/ex_bamboo_hr/blob/v0.6.0/lib/bamboo_hr/http_client/req.ex#L1)

HTTP client implementation using `Req`.

## Retry policy

Unless the caller passes `:retry` explicitly, requests use a custom retry
policy via `retry?/2`:

  * HTTP 429 responses are retried for **all** methods. BambooHR rate
    limits apply per-key regardless of verb, and 429 means the request
    was not processed so retrying a POST is safe. The `Retry-After`
    header is honoured by Req's default `:retry_delay`.
  * GET and HEAD additionally retry on 408/500/502/503/504 and the
    same transient transport errors as Req's `:safe_transient` mode.
  * POST is **not** retried on 5xx — those could indicate partial
    processing.

Callers can override by passing `retry:` in `opts` (e.g. `retry: false`
to disable, or a custom function).

# `retry?`

```elixir
@spec retry?(Req.Request.t(), Req.Response.t() | Exception.t()) :: boolean()
```

Retry predicate passed to `Req`. Returns `true` to retry, `false` otherwise.

---

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