Hi all!

I've been thinking about routing lately and I think that the
system can be made more generic. There can be various way of
matching an URL like the current way, regexps etc. We should
start by providing the very basic functionality - API that
expects a predicate:

 enum HTTP {
     GET,
     POST,
     UPDATE,
     DELETE
 }

 class Router {
     ...
     Router match(HTTP reqType, bool delegate(string) 

predicate, HttpRequestHandler);

 }
 auto router = new Router;
 router.match(HTTP.GET, (url) => url == "/", &handleIndex);

Having the most generic API we can provide a more specific
implementations like the current or regex:

 class Router {
     ...
     Router match(HTTP reqType, string pattern, 

HttpRequestHandler);

 Router match(HTTP reqType, Regex!char pattern, 

HttpRequestHandler);

 }

Also, using enumeration for request type rather than dedicated
methods get(), post() etc is more flexible. Does it look good and
does anyone have any other thoughts? If yes, I will then go ahead
with it and submit a pull request.