1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

better query example

This commit is contained in:
Nikolay Kim 2018-05-02 06:30:06 -07:00
parent 31e23d4ab1
commit a38acb41e5

View File

@ -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);
```