spry_interceptor 0.0.1 copy "spry_interceptor: ^0.0.1" to clipboard
spry_interceptor: ^0.0.1 copied to clipboard

discontinuedreplaced by: spry
outdated

Exception interceptor for Spry, which intercepts exceptions and errors and writes response to prevent unexpected application interruption.

Spry interceptor #

Exception interceptor for Spry, which intercepts exceptions and errors and writes response to prevent unexpected application interruption.

Example #

import 'package:spry/spry.dart';
import 'package:spry_interceptor/spry_interceptor.dart';

void main() {
  final Spry spry = Spry();
  final Interceptor interceptor = Interceptor(
    handler: ExceptionHandler.json(),
  );

  handler(Context context) {
    throw HttpException.forbidden();
  }

  spry.use(interceptor);
  spry.listen(handler, port: 3000);

  print('Listening om http://localhost:3000');
}

Documentation #

Read the documentation site.

0
likes
0
points
2
downloads

Publisher

verified publisherodroe.com

Weekly Downloads

Exception interceptor for Spry, which intercepts exceptions and errors and writes response to prevent unexpected application interruption.

Homepage

License

unknown (license)

Dependencies

spry

More

Packages that depend on spry_interceptor