typebeat
typebeat copied to clipboard
Introduce a mime type
Often, only the mime type is used. Would it be possible to define a mime type, and include a value of this type in the contenttype ? This would allow to manipule mime types more easily.
Something like
type mime = (ty, subty)
type content = { mime: mime ; ...}
or if you want to keep a record type:
type mime = { ty : ty ; subty: subty }
type content = { mime: mime ; ...}
Of course it would be great to have mime_of_string, string_of_mime functions, too.