(data, headers)
| 10123 | } |
| 10124 | |
| 10125 | function defaultHttpResponseTransform(data, headers) { |
| 10126 | if (isString(data)) { |
| 10127 | // Strip json vulnerability protection prefix and trim whitespace |
| 10128 | var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim(); |
| 10129 | |
| 10130 | if (tempData) { |
| 10131 | var contentType = headers('Content-Type'); |
| 10132 | if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) { |
| 10133 | data = fromJson(tempData); |
| 10134 | } |
| 10135 | } |
| 10136 | } |
| 10137 | |
| 10138 | return data; |
| 10139 | } |
| 10140 | |
| 10141 | function isJsonLike(str) { |
| 10142 | var jsonStart = str.match(JSON_START); |
nothing calls this directly
no test coverage detected