Skip to content

Commit cf47d51

Browse files
committed
fix(browser): parse scim2 responses with non-standard json content-types
1 parent b7fac26 commit cf47d51

3 files changed

Lines changed: 330 additions & 131 deletions

File tree

‎packages/browser/src/FetchHttpClient.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class FetchHttpClient extends HttpClient {
100100
}
101101

102102
const contentType: string = fetchResponse.headers.get('content-type') ?? '';
103-
const responseData: T = contentType.includes('application/json')
103+
const responseData: T = /json/i.test(contentType)
104104
? await fetchResponse.json()
105105
: ((await fetchResponse.text()) as any);
106106

0 commit comments

Comments
 (0)