mirror of
https://github.com/actix/actix-web.git
synced 2024-12-19 06:36:36 +00:00
better query example
This commit is contained in:
parent
31e23d4ab1
commit
a38acb41e5
1 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,14 @@
|
|||
|
||||
* `HttpRequest::query()` is deprecated. Use `Query` extractor.
|
||||
|
||||
```rust
|
||||
fn index(q: Query<HashMap<String, String>>) -> Result<..> {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```rust
|
||||
let q = Query::<HashMap<String, String>>::extract(req);
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue