contentTypeFor
contentTypeFor(
pathOrExt,overrides?):string
Defined in: src/http/MimeTypes.ts:82
Resolve a content-type from a path or bare extension. Text-ish types
get ; charset=utf-8; unknown extensions fall back to
application/octet-stream. overrides (ext → full content-type, taken
verbatim) win over the defaults.
Parameters
Section titled “Parameters”pathOrExt
Section titled “pathOrExt”string
overrides?
Section titled “overrides?”Readonly<Record<string, string>>
Returns
Section titled “Returns”string
