MediaType¶
An HTTP media type consisting of a top-level type and subtype.
Both components are lowercased at construction for case-insensitive
comparison. No validation is performed on the values — this is consistent
with Header, which stores names and values as-is.
Use ContentNegotiation to match media types against an Accept header.
Implements¶
- Equatable[MediaType val] ref
- Stringable box
Constructors¶
create¶
Create a media type with the given type and subtype, lowercased.
Parameters¶
Returns¶
- MediaType val^
Public fields¶
let type_name: String val¶
let subtype: String val¶
Public Functions¶
eq¶
Parameters¶
- that: MediaType val
Returns¶
- Bool val
ne¶
Parameters¶
- that: MediaType val
Returns¶
- Bool val
string¶
Returns¶
- String iso^