Module Webs_kit.Mime_type

MIME type tools.

val default_of_ext : Webs.Http.mime_type Stdlib.Map.Make(Stdlib.String).t Stdlib.Lazy.t

default_of_ext is a default file extension (including the .) to MIME type map.

It is documented by its implementation. Non self-describing text/* MIME types have a parameter charset=utf-8 added.

val of_ext : ?⁠map:Webs.Http.mime_type Stdlib.Map.Make(Stdlib.String).t -> string -> Webs.Http.mime_type

of_ext ~map ext finds ext in map (defaults to default_ext_to_mime) or defaults to "application/octet-stream"