1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

added HttpRequest::content_type(), query() method returns HashMap

This commit is contained in:
Nikolay Kim
2017-10-29 06:03:21 -07:00
parent d93244aa4f
commit b2670c94f4
2 changed files with 21 additions and 5 deletions

View File

@ -72,9 +72,8 @@ fn test_request_query() {
Version::HTTP_11, HeaderMap::new(), "id=test".to_owned());
assert_eq!(req.query_string(), "id=test");
let query: Vec<_> = req.query().collect();
assert_eq!(query[0].0.as_ref(), "id");
assert_eq!(query[0].1.as_ref(), "test");
let query = req.query();
assert_eq!(query.get("id").unwrap(), "test");
}
#[test]