BREAK CHANGE: HttpConnect.close removed, and handlers shall return Future instead

13 views
Skip to first unread message

Tom Yeh

unread,
Apr 15, 2013, 10:50:46 PM4/15/13
to rik...@googlegroups.com
In the upcoming Rikulo Stream 0.7, the interface between the server and the handlers are changed to simplify the chaining of request handling and error handling:
  1. The request handler must return `Future` if it spawned an asynchronous task.
  2. The request filter must return `Future`.
  3. The request handler can't return a forwarding URI. Rather, it shall invoke and return `connect.forward(uri)` instead.
  4. The request handler needs not to close the connection. It is done automatically. In fact, there is no way to close it manually.
  5. RSP will import `dart:async` by default.
  6. The `close`, `onClose` and `onError` methods of `HttpConnect` are removed. Chaining request handlers is straightforward: it is the same as chaining `Future` objects.
Remember to read the Request Handling section  again when 0.7 is released. There will be more detailed description.
Reply all
Reply to author
Forward
0 new messages