We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a92fd62 commit f3f2542Copy full SHA for f3f2542
src/core.ts
@@ -48,8 +48,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
48
}
49
50
const contentType = response.headers.get('content-type');
51
- const isJSON =
52
- contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
+ const mediaType = contentType?.split(';')[0]?.trim();
+ const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
53
if (isJSON) {
54
const json = await response.json();
55
0 commit comments