Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com> Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
15 lines
324 B
JavaScript
15 lines
324 B
JavaScript
export const knownContentTypes = [
|
|
"application/json",
|
|
"application/ld+json",
|
|
"application/hal+json",
|
|
"application/vnd.api+json",
|
|
"application/xml",
|
|
"application/x-www-form-urlencoded",
|
|
"text/html",
|
|
"text/plain",
|
|
]
|
|
|
|
export function isJSONContentType(contentType) {
|
|
return /\bjson\b/i.test(contentType);
|
|
}
|