Skip to content

How to extract the entire current path in a handler function instead of extracting parameters from the path. #2652

Answered by jplatte
graphsay asked this question in Q&A
Discussion options

You must be logged in to vote

You can add a http::Uri parameter to your handler and get the path from that.

You can also use different handler functions that just call the same inner function immediately that does the actual work, while passing an extra parameter for route-specific information.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@graphsay
Comment options

Answer selected by graphsay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants