How to receive json parameters correctly?
- 主要語言
- Rust
- 星號
- 783
- 分支
- 102
- PR 合併指標
- 30 天內沒有已合併 PR
描述
This is the routing method for post_authorize in the example code
```rust
async fn post_authorize(
(r, req, state): (HttpRequest, OAuthRequest, web::Data>), ) -> Result {
) -> Result {
state
.send(Authorize(req).wrap(Extras::AuthPost(r.query_string().to_owned())))
.await?
}
```
The second parameter req is an OAuthRequest object, if I want to receive the json parameter uploaded by the client I have to change the type of this parameter to web::Json, then I lose the OAuthRequest object and can't do the subsequent operations.
How can I receive the json parameter correctly or can I manually create an OAuthRequest object in this method using the OAuthRequest::new() method to perform the subsequent operations.
Thank you!!!
貢獻指南
評估
這個 Issue 還沒有評估資料。