network library

Classes

ApiClient<E extends NetworkError, R extends ApiRequest>
---- Abstract ApiClient ----
ApiError
ApiRequest<T>
AuthInterceptor
Auth interceptor that reads a token from a callback
CanceledRequestError
DefaultApiClient
---- Example concrete implementation ----
DownloadApiRequest<T>
Download request
LoggingInterceptor
Minimal logging interceptor for dev: logs method/path/status only. Intentionally never logs headers, bodies, or query parameters, since any of those can carry auth tokens or other secrets.
MockBaseUrlInterceptor
Simple mock-base-url interceptor: if options.extra'isMocked' == true, replace baseUrl with the provided mock base URL.
MultipartApiRequest<T>
Multipart request
NetworkError
UnknownNetworkError

Enums

HttpMethod

Mixins

DownloadClient<E extends NetworkError, R extends ApiRequest>
---- Download mixin (keeps download behavior separate) ----

Typedefs

ApiResult<E, T> = Future<Either<E, Response<T>>>
Type alias for a future that returns either an error or a successful response.
ResponseDecoder<T> = T Function(dynamic raw)
Request base typed with T.