I need to handle requests that may have a number of sub path elements (that I can ignore), e.g. the following would all map to the same handler:
- /abc?type=a
- /abc/foo?type=a
- /abc/foo/bar?type=a
The only code I have come up with is:
Handlers.pathTemplate().add("/{id}", handler).add("/{id}/foo", handler).add("/{id}/foo/bar", handler);
But this is not ideal as I need to define each possible path, is there anyway to allow (and ignore) any number of paths following my prefix e.g.
Handlers.pathTemplate().add("/{id}*", handler)
Handlers.path().addPrefixPath
allows this sort of matching but then I would lose the path template variables.