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

Iron's Request has no method get #38

Closed
jaredly opened this issue Nov 19, 2014 · 2 comments
Closed

Iron's Request has no method get #38

jaredly opened this issue Nov 19, 2014 · 2 comments

Comments

@jaredly
Copy link

jaredly commented Nov 19, 2014

I just copied the code from the readme, and it looks like the example is outdated. This is the error I get.

src/server.rs:38:15: 38:49 error: type `&mut iron::request::Request` does not implement any method in scope named `get`
src/server.rs:38     match req.get::<BodyParser<PleaseCompile>>() {
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Also, the link to the docs is dead...

@jaredly
Copy link
Author

jaredly commented Nov 19, 2014

Ok, I just needed to use iron::Plugin

@jaredly jaredly closed this as completed Nov 19, 2014
@reem
Copy link
Member

reem commented Nov 19, 2014

@jaredly To avoid this sort of problem in the future, you can use iron::prelude::*, which imports commonly used traits and a few pervasive types.

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

No branches or pull requests

2 participants