MCPcopy Index your code
hub / github.com/angular-ui/ui-router / serverRequest

Function serverRequest

test/angular/1.6/angular.js:12443–12462  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

12441 }
12442
12443 function serverRequest(config) {
12444 var headers = config.headers;
12445 var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
12446
12447 // strip content-type if data is undefined
12448 if (isUndefined(reqData)) {
12449 forEach(headers, function(value, header) {
12450 if (lowercase(header) === 'content-type') {
12451 delete headers[header];
12452 }
12453 });
12454 }
12455
12456 if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
12457 config.withCredentials = defaults.withCredentials;
12458 }
12459
12460 // send request
12461 return sendReq(config, reqData).then(transformResponse, transformResponse);
12462 }
12463
12464 function transformResponse(response) {
12465 // make a copy since the response must be cacheable

Callers

nothing calls this directly

Calls 6

transformDataFunction · 0.70
headersGetterFunction · 0.70
isUndefinedFunction · 0.70
forEachFunction · 0.70
lowercaseFunction · 0.70
sendReqFunction · 0.70

Tested by

no test coverage detected