-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added IHttpRouter interface #177
Conversation
Just out of curiosity, what does your router do different/additional? In general I don't see any issue adding an interface, I'll just make some small inline notes that would be good to have handled before merging. |
@@ -16,6 +16,68 @@ import std.functional; | |||
|
|||
|
|||
/++ | |||
An interface for HTTP request routers. | |||
+/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: would be good to have /** .. */
style comments for consistency
I have 2 different routers. One which uses regex based parsing with named subgroups for parameter selection a la django (this relies on a patch to phobos that has yet to be merged) and another that allows the exposing of another router on a subpath i.e.
|
Thanks, merging in... |
…ly with the latest style practice. See also pull #177.
I've been implementing my own router class recently, and I've felt the need for an interface for Http Routers in two ways:
This pull request adds a IHttpRouter interface that implements all of the convenience functions from UrlRouter and also modifies UrlRouter slightly to implement IHttpRouter (I changed the return value of match from void to IHttpRouter).