Skip to main content

parse_media_type

Function parse_media_type 

Source
pub fn parse_media_type(
    v: &str,
) -> Result<(String, HashMap<String, String>), MimeError>
Expand description

Parse a MIME media-type value and its parameters.

Content-Type: text/html; charset=utf-8

returns ("text/html", {"charset": "utf-8"}).

Port of Go’s mime.ParseMediaType.