Skip to main content

is_json_content_type

Function is_json_content_type 

Source
pub fn is_json_content_type(value: &str) -> bool
Expand description

Returns whether a Content-Type value denotes UTF-8 application/json.

The charset parameter is optional because JSON exchanged by this binding is always UTF-8; when present, its value must be utf-8. Other parameters are rejected so intermediaries cannot silently select another representation.