typebeat icon indicating copy to clipboard operation
typebeat copied to clipboard

Introduce a mime type

Open zoggy opened this issue 6 years ago • 0 comments

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.

zoggy avatar Mar 20 '19 21:03 zoggy