angel-dart-archive / range

[DEPRECATED] Rolled into package:angel_static in Angel 2.

Home Page:https://pub.dartlang.org/packages/angel_range

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEPRECATED

Angel 2's version of package:angel_static includes range header support out-of-the-box, rather than requiring a separate package.

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()]);
}

About

[DEPRECATED] Rolled into package:angel_static in Angel 2.

https://pub.dartlang.org/packages/angel_range

License:MIT License


Languages

Language:Dart 100.0%