(response: Response)
| 413 | * ``` |
| 414 | */ |
| 415 | export function isProblemDetailsResponse(response: Response): boolean { |
| 416 | const contentType = response.headers.get("Content-Type"); |
| 417 | if (contentType === null) return false; |
| 418 | const semi = contentType.indexOf(";"); |
| 419 | const base = semi === -1 ? contentType : contentType.substring(0, semi); |
| 420 | const mediaType = base.toLowerCase().trim(); |
| 421 | return mediaType === PROBLEM_JSON_MEDIA_TYPE; |
| 422 | } |
no test coverage detected