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

read ^^^^ method not found in &mut salvo::Request #114

Closed
jhjacobs81 opened this issue Aug 5, 2022 · 4 comments
Closed

read ^^^^ method not found in &mut salvo::Request #114

jhjacobs81 opened this issue Aug 5, 2022 · 4 comments

Comments

@jhjacobs81
Copy link

jhjacobs81 commented Aug 5, 2022

Describe the bug
i am trying to read json thats posted to my handler. the documentation on https://salvo.rs/book/basics/request/ says i should do it like so: req.read::<User>().await;
but when i do this, the program wont compile due to the above error

@chrislearn
Copy link
Member

I forgot to update document.
This function has renamed to extract_body.
You can get latest api from here: https://docs.rs/salvo_core/latest/salvo_core/http/request/struct.Request.html#method.extract_body

@jhjacobs81
Copy link
Author

Thank you again for the quick answer! this is indeed the solution :-)

@jhjacobs81
Copy link
Author

Is there some discord or irc channel? I would like to learn how to use sessions with Salvo, without having to open bugreports or something :)

@chrislearn
Copy link
Member

Just use github https://github.com/salvo-rs/salvo/discussions.
Session is supported, but I do not use it in daily work and it is not fully tested.
Just open issue if you have any questions.

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