Const
Readonly
Content type patterns for response parsing
JSON content type pattern for parsing
Text content type patterns (includes XML)
Binary content type patterns (images, videos, etc.)
Patterns used to determine how to parse response data based on the Content-Type header.
// Check content type for parsingif (contentType.includes(CONTENT_TYPES.JSON)) { return response.json();}// Check if binary contentif (CONTENT_TYPES.BINARY.test(contentType)) { return response.blob();} Copy
// Check content type for parsingif (contentType.includes(CONTENT_TYPES.JSON)) { return response.json();}// Check if binary contentif (CONTENT_TYPES.BINARY.test(contentType)) { return response.blob();}
Content type patterns for response parsing