Last active
December 16, 2022 17:44
-
-
Save felangel/749b4d4716bd2e3e4069eba07dcbed47 to your computer and use it in GitHub Desktop.
Dart Frog Catch All Middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:dart_frog/dart_frog.dart'; | |
Handler middleware(Handler handler) { | |
return Cascade().add(handler).add(catchAll).handler; | |
} | |
Response catchAll(RequestContext context) => Response(body: 'Catch All'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment