Skip to content

Commit f3f2542

Browse files
chore(internal): codegen related update (#554)
1 parent a92fd62 commit f3f2542

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
4848
}
4949

5050
const contentType = response.headers.get('content-type');
51-
const isJSON =
52-
contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
51+
const mediaType = contentType?.split(';')[0]?.trim();
52+
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
5353
if (isJSON) {
5454
const json = await response.json();
5555

0 commit comments

Comments
 (0)