s_client/src/client library

Classes

SClient
A powerful HTTP client supporting both http and dio backends.

Typedefs

ClientResult = (ClientResponse?, ClientException?)
A result type for HTTP requests containing either a response or an error.
JsonResult<T> = (T?, Object?)
A result type for parsed JSON responses.
OnError = void Function(ClientException error)
Callback for error responses.
OnHttpError = void Function(int statusCode, ClientResponse response)
Callback for HTTP error responses (non-2xx that aren't exceptions).
OnProgress = void Function(int current, int total)
Callback for download/upload progress.
OnStatus = void Function(int statusCode, ClientResponse response)
Callback for custom status code handling.
OnSuccess = void Function(ClientResponse response)
Callback for successful responses.
OnSuccessTyped<T> = void Function(T data, ClientResponse response)
Callback for successful responses with typed data.