MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / serverRequest

Function serverRequest

lib/test/angular/1.7.0/angular.js:12445–12464  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

12443 }
12444
12445 function serverRequest(config) {
12446 var headers = config.headers;
12447 var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
12448
12449 // strip content-type if data is undefined
12450 if (isUndefined(reqData)) {
12451 forEach(headers, function(value, header) {
12452 if (lowercase(header) === 'content-type') {
12453 delete headers[header];
12454 }
12455 });
12456 }
12457
12458 if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
12459 config.withCredentials = defaults.withCredentials;
12460 }
12461
12462 // send request
12463 return sendReq(config, reqData).then(transformResponse, transformResponse);
12464 }
12465
12466 function transformResponse(response) {
12467 // 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