From 6b484c1517a7ef8843967e25782795e85023c4c1 Mon Sep 17 00:00:00 2001 From: Fabusuyi Ayodeji <44564880+thedejifab@users.noreply.github.com> Date: Sat, 2 May 2020 14:53:22 +0100 Subject: [PATCH 1/2] Update res.end() to use res.close() --- guides/requests-and-responses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/requests-and-responses.md b/guides/requests-and-responses.md index 2d0f62d..4907afc 100644 --- a/guides/requests-and-responses.md +++ b/guides/requests-and-responses.md @@ -11,7 +11,7 @@ Angel is inspired by Express, and such, request handlers in general resemble those from Express. Request handlers can return any Dart object \(see [how they are handled](requests-and-responses.md#return-values)\). Basic request handlers accept two parameters: * [`RequestContext`](https://www.dartdocs.org/documentation/angel_framework/latest/angel_framework/RequestContext-class.html) - Contains vital information about the client requesting a resource, such as request method, request body, IP address, etc. The request object can also be used to pass information from one handler to the next. -* [`ResponseContext`](https://www.dartdocs.org/documentation/angel_framework/latest/angel_framework/ResponseContext-class.html) - Allows you to send headers, write data, and more, to be sent to the client. To prevent a response from being modified by future handlers, call `res.end()` to prevent further writing. +* [`ResponseContext`](https://www.dartdocs.org/documentation/angel_framework/latest/angel_framework/ResponseContext-class.html) - Allows you to send headers, write data, and more, to be sent to the client. To prevent a response from being modified by future handlers, call `res.close()` to prevent further writing. ### Return Values From d58146f817f0d5becaf9d99b202e80c8a45e6eb3 Mon Sep 17 00:00:00 2001 From: Fabusuyi Ayodeji <44564880+thedejifab@users.noreply.github.com> Date: Sat, 2 May 2020 15:01:09 +0100 Subject: [PATCH 2/2] Quick grammar fix --- guides/getting-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/getting-started.md b/guides/getting-started.md index db353d7..8f37b6e 100644 --- a/guides/getting-started.md +++ b/guides/getting-started.md @@ -112,7 +112,7 @@ listening at port `3000`. By adding *routes* to our server, we can respond to requests sent to different URL's. -Let's a handler at the *root* of our server, and print +Let's add a handler to the *root* of our server, and print a simple `Hello, world!` message. From this point, all new code needs to be added *before* @@ -333,4 +333,4 @@ https://pub.dartlang.org/packages?q=dependency%3Aangel_framework Don't forget that for discussion and support, you can either file a Github issue, or join the Gitter chat: -https://gitter.im/angel_dart/discussion \ No newline at end of file +https://gitter.im/angel_dart/discussion