accept_matches

Function accept_matches 

Source
pub fn accept_matches(headers: &HeaderMap, media_type: &str) -> bool
Expand description

Does the request’s Accept header name media_type (the compiled, NORMALIZED type/subtype of match.accept — RouteTable::accept_media_type, never the raw config string)? Any comma-separated entry of ANY Accept header line matches, case-insensitively, with parameters (;q=..., media-type parameters) and surrounding whitespace ignored. Wildcard entries (*/*, type/*) never match a specific type, and no Accept header at all never matches — both deliberately (see the module docs).