Chromium Code Reviews
DescriptionAdd HTTP handler registration to the HTTP server
NOTE: This is a breaking change.
The onRequest callback on the HTTP server have been removed in favor
of the ability to register handlers. A handler can be either a
function or an instance of a class which implements a specific
interface. Each handler registration has a regular expression which is
matched against the request path.
There is also a default handler which can be set to handle all
requests which is not matched by any of the registered patterns. If
there is no default handler explicitly set there is a builtin one
which will just return 404 status.
Currently the method is not considered in the matching.
R=ager@google.com, ajohnsen@google.com
BUG=none
TEST=tests/standalone/src/io/HttpServerHandlerTest.dart
Committed: https://code.google.com/p/dart/source/detail?r=6683
Patch Set 1 #
Total comments: 5
Patch Set 2 : Revert test edit #
Total comments: 13
Patch Set 3 : Addressed review comments #Messages
Total messages: 4 (0 generated)
|