fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #877 from qqilihq/fix/json-content-type

authored by

Lubos and committed by
GitHub
65e19265 912d4ebe

+8 -3
+5
.changeset/sweet-parrots-roll.md
··· 1 + --- 2 + '@hey-api/client-fetch': patch 3 + --- 4 + 5 + Relax JSON content type check so that e.g. `application/json; charset=utf-8` is properly detected
+1 -1
packages/client-fetch/src/utils.ts
··· 332 332 return; 333 333 } 334 334 335 - if (content === 'application/json' || content.endsWith('+json')) { 335 + if (content.startsWith('application/json') || content.endsWith('+json')) { 336 336 return 'json'; 337 337 } 338 338
+1 -1
packages/openapi-ts/test/__snapshots__/test/generated/v3_hey-api_client-fetch_bundle/core/utils.ts.snap
··· 332 332 return; 333 333 } 334 334 335 - if (content === 'application/json' || content.endsWith('+json')) { 335 + if (content.startsWith('application/json') || content.endsWith('+json')) { 336 336 return 'json'; 337 337 } 338 338
+1 -1
packages/openapi-ts/test/__snapshots__/test/generated/v3_hey-api_client-fetch_bundle_transform/core/utils.ts.snap
··· 332 332 return; 333 333 } 334 334 335 - if (content === 'application/json' || content.endsWith('+json')) { 335 + if (content.startsWith('application/json') || content.endsWith('+json')) { 336 336 return 'json'; 337 337 } 338 338