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

handle keys when route path is a regex #44

Merged
merged 2 commits into from Jan 10, 2014
Merged

Conversation

piif
Copy link
Contributor

@piif piif commented Jan 9, 2014

added ability to specify param keys when route path is a regex :
added in server methods get, ws, ... a named argument "keys", used instead of labels in path

example :

myServer.get(new RegExp(r'^/users/(\w+)(.*)$'), keys: ["user", "path"]).listen((Request request) {
  // match /users/aUser/a/long/path/with/slashes
  // request.params["path"] equals "a/long/path/with/slashes"
}

lvivski added a commit that referenced this pull request Jan 10, 2014
handle keys when route path is a regex
@lvivski lvivski merged commit 5de5c76 into lvivski:master Jan 10, 2014
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 this pull request may close these issues.

None yet

2 participants