fetch_file library

Fetch API binding to file resources based on the dart:io package.

Please note that this library cannot be used on Dart or Flutter apps targeted on a web browser as dart:io is not supported on web.

Usage: import package:datatools/fetch_file.dart

Classes

Anchor
An anchor for a resource.
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 fetcher with FetchApi for fetching and Controlled for control data.
FileContent
File content providing body and stream access for a file resource.
FileFetcher
A basic file fetcher implementation (using 'dart:io', not working on web).
An interface providing 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.