plugin library

Classes

Asset
An asset (aka., resource), such as a file or a BLOB object in database.
AssetCache
A cache for storing resources.
AssetLoader
A skeletal implementation of ResourceLoader that utilizes AssetCache and supports all HTTP requirements such as partial content, multi-part loading, ETag and more.
DefaultRouter
The default implementation of Router.
FileAsset
A file-based asset.
FileLoader
A file-system-based asset loader.
RangeParseResult
Outcome of parseRangeHeaders — exposed for testing.
ResourceLoader
Resource loader.
Router
Router for mapping URI to renderers.

Functions

checkIfHeaders(HttpConnect connect, DateTime? lastModified, String? etag) → bool
Check if the conditions specified in the optional If headers are satisfied, such as If-Modified-Since and If-None-Match headers.
loadAsset(HttpConnect connect, Asset asset, [AssetCache? cache]) → Future
Loads an asset into the given response.
parseRangeHeaders(String? rangeHeader, String? ifRangeHeader, DateTime lastModified, String? etag, int assetSize) → RangeParseResult
Pure parser for the Range and If-Range request headers — exposed for testing. Production callers should use _parseRange which translates the result into HttpConnect response side effects.