range

Pub build status coverage: 100%

Support for handling the Range headers using the Angel framework. Aiming for 100% compliance with the Range specification.

Installation

In your pubspec.yaml:

dependencies:
  angel_framework: ^1.0.0
  angel_range: ^1.0.0

Usage

The acceptRanges() function returns an Angel request handler. This is best used as a response finalizer.

Compression

If you are using response compression in your application, make sure to add it after Range support. Save yourself a headache!

configureServer(Angel app) async {
  // Apply `Range` headers, if need be
  app.responseFinalizers.add(acceptRanges());
  
  // Support gzip, deflate compression
  app.responseFinalizers.addAll([gzip(), deflate()]);
}

Libraries

angel_range