From 305b7f2767990ea4ba0388b751119337e91ea217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=99=E6=AD=A3?= Date: Tue, 21 Jun 2022 23:53:35 +0800 Subject: [PATCH] Support text/json as a JSON mime type #1019 --- src/utils/mimeUtility.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/mimeUtility.ts b/src/utils/mimeUtility.ts index c326072b..916df31f 100644 --- a/src/utils/mimeUtility.ts +++ b/src/utils/mimeUtility.ts @@ -65,7 +65,7 @@ export class MimeUtility { } const { subtype, essence } = this.parse(contentTypeString); - return essence === 'application/json' || subtype.endsWith('+json') || subtype.startsWith('x-amz-json'); + return essence === 'application/json' || essence === 'text/json' || subtype.endsWith('+json') || subtype.startsWith('x-amz-json'); } public static isXml(contentTypeString: string | undefined): boolean {