Skip to content

Commit

Permalink
Support text/json as a JSON mime type #1019
Browse files Browse the repository at this point in the history
  • Loading branch information
Huachao committed Jun 21, 2022
1 parent 9d2a899 commit 305b7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/mimeUtility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 305b7f2

Please sign in to comment.