Cancellation
Cancel in-flight requests with abort() and with cancelable requests that stop the previous search when a new one starts.
Retries
Retry failed requests with retry and retryTime, and watch every attempt end in a final success or error.
Deduplication
Let many callers that ask for the same data at once share one network request with deduplicate.
Queue
Send messages one at a time with queued requests, and start, pause, stop or remove them with useQueue.
Authentication
Log in, attach the token to every request with onAuth and refresh it on a 401 with onError.
Response mapping
Validate API responses with zod and map them to the app shape with setResponseMapper.
Mocking
Build a screen before its backend exists with setMock - mocked data, latency, errors and timeouts.
Custom retry
Retry only network errors and 5xx answers, with exponential backoff and jitter, and log every attempt.
Retry-After
Handle 429 Too Many Requests in one client interceptor that waits as long as the Retry-After header says and sends the request again.
Timeouts
Set a timeout per request with the adapter options, show a clear timeout state, and retry with the same or a longer limit.
Plugins
Write a logging plugin and a metrics plugin that see every request of the client, and show their output live.
Payload validation
Validate the payload with zod in a request mapper, show field errors in the form, and send nothing when the data is invalid.
Typed errors
Give each endpoint its own error type on top of the global one, and narrow the union in the UI to show the right message.