MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / transformResponse

Function transformResponse

web/static/bower_components/angular/angular.js:10270–10281  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

10268 return promise;
10269
10270 function transformResponse(response) {
10271 // make a copy since the response must be cacheable
10272 var resp = extend({}, response);
10273 if (!response.data) {
10274 resp.data = response.data;
10275 } else {
10276 resp.data = transformData(response.data, response.headers, response.status, config.transformResponse);
10277 }
10278 return (isSuccess(response.status))
10279 ? resp
10280 : $q.reject(resp);
10281 }
10282
10283 function executeHeaderFns(headers, config) {
10284 var headerContent, processedHeaders = {};

Callers

nothing calls this directly

Calls 3

extendFunction · 0.85
transformDataFunction · 0.85
isSuccessFunction · 0.85

Tested by

no test coverage detected