parse_mediatypes

Function parse_mediatypes 

Source
pub fn parse_mediatypes(
    headers: &HeaderMap,
) -> Result<Vec<MediaType<'_>>, AcceptRejection>
Expand description

Parse and process the media types from the accept header.

ยงErrors

Returns an error if the accept header is invalid or no match was found.