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

Chainable routes #262

Open
flosse opened this issue Aug 15, 2015 · 3 comments
Open

Chainable routes #262

flosse opened this issue Aug 15, 2015 · 3 comments

Comments

@flosse
Copy link

flosse commented Aug 15, 2015

Is it possible to do something like this:

server.route("/api/v0/foo")
  .get(middleware!{ ... })
  .post(middleware!{ ... })
  .put(middleware!{ ... });
@Ryman
Copy link
Member

Ryman commented Aug 19, 2015

Not currently, would you like to try implementing it? It could be done by returning &mut Self for each of the methods in the HttpRouter trait (and updating anything that breaks)!

@flosse
Copy link
Author

flosse commented Aug 19, 2015

would you like to try implementing it?

I'll see.... at the earliest in 3 weeks :-\

homu added a commit that referenced this issue Aug 25, 2015
feat(router): add chainable routes

Closes #262
@homu homu closed this as completed in #270 Aug 25, 2015
@Ryman
Copy link
Member

Ryman commented Aug 25, 2015

Reopening due to discussion on #270

@Ryman Ryman reopened this Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants