Skip to content

Commit

Permalink
Support json media types with charset
Browse files Browse the repository at this point in the history
  • Loading branch information
Markel Tuzynskyi committed Apr 14, 2021
1 parent c42cc33 commit a482bf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/operation-variant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class OperationVariant {
}

mediaType = mediaType.toLowerCase();
if (mediaType.endsWith('/json') || mediaType.endsWith('+json')) {
if (mediaType.includes('/json') || mediaType.includes('+json')) {
return 'json';
} else if (mediaType.startsWith('text/')) {
return 'text';
Expand Down

0 comments on commit a482bf4

Please sign in to comment.