From c2de78db0c0f17a72467d023588a2690cacb7dbf Mon Sep 17 00:00:00 2001 From: regiostech Date: Thu, 21 Apr 2016 22:40:37 -0400 Subject: [PATCH] dev.5? --- lib/src/http/response_context.dart | 4 ++-- lib/src/http/server.dart | 4 ++-- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/http/response_context.dart b/lib/src/http/response_context.dart index ef081105..5e992f36 100644 --- a/lib/src/http/response_context.dart +++ b/lib/src/http/response_context.dart @@ -65,8 +65,8 @@ class ResponseContext extends Extensible { } /// Renders a view to the response stream, and closes the response. - Future render(String view, {Map data}) async { - write(await app.viewGenerator(view, data: data)); + Future render(String view, [Map data]) async { + write(await app.viewGenerator(view, data)); header(HttpHeaders.CONTENT_TYPE, ContentType.HTML.toString()); end(); } diff --git a/lib/src/http/server.dart b/lib/src/http/server.dart index b160f713..ef22018d 100644 --- a/lib/src/http/server.dart +++ b/lib/src/http/server.dart @@ -11,7 +11,7 @@ class Angel extends Routable { ServerGenerator _serverGenerator = (address, port) async => await HttpServer .bind(address, port); var viewGenerator = (String view, - {Map data}) => "No view engine has been configured yet."; + [Map data]) => "No view engine has been configured yet."; HttpServer httpServer; God god = new God(); @@ -54,7 +54,7 @@ class Angel extends Routable { null); ResponseContext res = await ResponseContext.from( request.response, this); - on404(req, res..status(404)); + on404(req, res); _finalizeResponse(request, res); }); diff --git a/pubspec.yaml b/pubspec.yaml index 28fb342c..847c8ac0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 0.0.0-dev.3 +version: 0.0.0-dev.5 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework