mirror of
https://github.com/actix/actix-extras.git
synced 2025-01-22 23:05:56 +01:00
better query example
This commit is contained in:
parent
31e23d4ab1
commit
a38acb41e5
@ -17,6 +17,14 @@
|
|||||||
|
|
||||||
* `HttpRequest::query()` is deprecated. Use `Query` extractor.
|
* `HttpRequest::query()` is deprecated. Use `Query` extractor.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
fn index(q: Query<HashMap<String, String>>) -> Result<..> {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
let q = Query::<HashMap<String, String>>::extract(req);
|
let q = Query::<HashMap<String, String>>::extract(req);
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user