I think it would be pretty nice to be able to do regex captures and have the arguments passed onto the handler. This would need to be on a separate struct from Route since captures cost more performance than just matches.
E.g.
RouterBuilder::new()
.add(RouteWithCaptures::get("/hello/(?P<name>[^/]*)/?").using(request_handler))
...
fn request_handler(a: Request<Body>, args: HashMap<String,String>) {
...
}
This could also be a stepping stone for the
Todo: add the ability to distinguish requests by query parameters.
Would you be open to a PR implementing this?