Removed 'before'/'after'

This commit is contained in:
Tobe O 2018-01-08 16:02:28 -05:00
parent 3d7b71f3dd
commit 7b69a6522e
3 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ main() async {
});
// Proxy any other request through to dartlang.org
app.after.add(angelHandler);
app.use(angelHandler);
var server = await app.startServer(InternetAddress.LOOPBACK_IP_V4, 8080);
print('Proxying at http://${server.address.host}:${server.port}');

View file

@ -12,7 +12,7 @@ import 'convert.dart';
/// * `angel_shelf.response` - The Angel [ResponseContext].
AngelConfigurer supportShelf() {
return (Angel app) async {
app.before.add((RequestContext req, ResponseContext res) async {
app.use((RequestContext req, ResponseContext res) async {
// Inject shelf.Request ;)
req.inject(
shelf.Request,

View file

@ -38,7 +38,7 @@ main() {
var app = new Angel()..lazyParseBodies = true;
app.get('/angel', 'Angel');
app.after.add(embedShelf(handler, throwOnNullResponse: true));
app.use(embedShelf(handler, throwOnNullResponse: true));
await app.configure(logRequests());
server = await app.startServer(InternetAddress.LOOPBACK_IP_V4, 0);