Skip to content
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

Unamed parameters end up in the parameter map #29

Closed
gameldar opened this issue Aug 13, 2019 · 0 comments · Fixed by #31
Closed

Unamed parameters end up in the parameter map #29

gameldar opened this issue Aug 13, 2019 · 0 comments · Fixed by #31

Comments

@gameldar
Copy link

You can define a path without naming the parameters e.g. /api/* or /api/:/something

The value at that position is parsed and then stored in the parameters and can be retrieved using an empty string match.params[""]

Conceptually unnamed parameters makes sense where you want to match the path but don't need a capture group for it - however it should not store the value in the map.

@gameldar gameldar changed the title Empty path ends up in the parameters Unamed parameters end up in the parameter map Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant