(data, headers)
| 10868 | } |
| 10869 | |
| 10870 | function defaultHttpResponseTransform(data, headers) { |
| 10871 | if (isString(data)) { |
| 10872 | // Strip json vulnerability protection prefix and trim whitespace |
| 10873 | var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim(); |
| 10874 | |
| 10875 | if (tempData) { |
| 10876 | var contentType = headers('Content-Type'); |
| 10877 | if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) { |
| 10878 | data = fromJson(tempData); |
| 10879 | } |
| 10880 | } |
| 10881 | } |
| 10882 | |
| 10883 | return data; |
| 10884 | } |
| 10885 | |
| 10886 | function isJsonLike(str) { |
| 10887 | var jsonStart = str.match(JSON_START); |
nothing calls this directly
no test coverage detected