-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
new field and getter in Request for matchedRoute #1049
Conversation
@perwendel @tipsy @jakaarl @joatmon @M-Razavi Have any of you had a chance to look at this? I would greatly appreciate it. :) |
Looks good to me. |
@robax, @tipsy First of all the method has not been implemented in The get("/hello", (request, response) -> "hello: " + request.matchedRouteUri());
get("/users/:u", (q, a) -> "user: " + q.matchedRouteUri());
after((q, a) -> {
System.out.println("after: " + q.matchedRouteUri());
}); the sysout in the after filter will say:
which is unambiguous. In the first two cases it's value is based on matching of prior routes whereas in the latter case it's the matching of the filter itself. |
Seems like I didn't read this as well as I should have. I think the functionality is good, but it looks like the implementation needs some work. @perwendel I don't see the problem with the output in your example though. In each case it prints the path that was used to match the route/filter. You could return early in a Maybe |
…ed in changeMatch()
Thanks for the thorough responses guys! I added a method matchedRouteUri() in the RequestWrapper class and I'm now updating the matched route in the changeMatch() method. I'm also happy to change the method name as per @tipsy. I don't see the problem with your example @perwendel. Does updating the route in changeMatch() fix your concern? Or can you further illustrate the issue? |
Would you guys be able to take another peek at this please? @perwendel @tipsy |
@robax Per is away for some time. It looks fine to me, but it would be good if you could include an integration test where you call it in a filter too. |
Good recommendation @tipsy ! I added the integration tests and I'll wait until @perwendel gets back. |
This feature would be really useful for us. I was wondering if it is any closer to being accepted? |
I pinged @perwendel on twitter (https://twitter.com/perwendel/status/1073127244988600321) a little over a month ago and he said he was close to reviewing PR's. I hope we can merge this in soon as it is a tiny change and one that would help us quite a bit aswell! |
@tipsy Sorry to keep pinging you on this, but you seem to be the only active maintainer. Would you be able to merge this PR? I pinged @perwendel again on Twitter a month ago and haven't received a response. |
Sure, this shouldn't be too controversial to merge. |
Is there any timeframe for when this change will appear in a released version? |
@robax The functionality of this is good. However, I'm not sure about the name @jon-ruckwood the plan is to release 2.9.0 this week. |
If no other input I will change to |
PR for #1048 ping @perwendel