fetch_api library

Fetch API abstraction (addresses, content, control data, exceptions, fetch).

Usage: import package:datatools/fetch_api.dart

Classes

Anchor
An interface for a resource anchor.
Body
An interface for accessing content body as String, bytes or JSON objects.
Content
Content represents a data entity.
Controlled<C>
An interface to set control data to a client (ie. HTTP client or fetcher).
FetchApi<C extends Content>
An interface to fetch data from a resource like Web API, a cache or a file.
Fetcher<C extends Content>
A interface supporting FetchApi for fetching and Controlled for control data.
Head represents meta data for some content.

Enums

OriginFailure
Common failure types related to OriginException.

Mixins

FetchMixin<C extends Content>
A mixin for FetchApi with partial implemention.

Typedefs

UriResolver = Uri Function(Uri reference)
A function to resolve an absolute URI from an URI reference.

Exceptions / Errors

ApiException
An exception occurred when accessing an API.
ClientException
An exception occurred when accessing an API and caused by client-side code.
OriginException
An exception containing a failure message as a response from an API origin.