We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1c053b commit d4adb66Copy full SHA for d4adb66
src/core.ts
@@ -62,8 +62,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
62
}
63
64
const contentType = response.headers.get('content-type');
65
- const isJSON =
66
- 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');
67
if (isJSON) {
68
const json = await response.json();
69
0 commit comments