I got the error below. how can i get request cookie.
fn handler(
req: HttpRequest,
query: web::Query<HashMap<String, String>>
) -> impl Future<Item = HttpResponse, Error = AWError> {
let _ = req.cookie("key-name");
error[E0599]: no method named `cookie` found for type `actix_web::HttpRequest` in the current scope
--> src/main.rs:61:17
|
61 | let _ = req.cookie("key-name");
Cargo.toml
[dependencies]
actix-rt = "0.2.2"
actix-web = "1.0.0-beta.5"
actix-http = "0.1.0"
futures = "0.1"
time = "0.1"
env_logger = "0.5"
uuid = { version = "0.7", features = ["serde", "v4"] }
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"