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

Function serverRequest

lib/test/angular/1.6.7/angular.js:12294–12313  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

12292 }
12293
12294 function serverRequest(config) {
12295 var headers = config.headers;
12296 var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
12297
12298 // strip content-type if data is undefined
12299 if (isUndefined(reqData)) {
12300 forEach(headers, function(value, header) {
12301 if (lowercase(header) === 'content-type') {
12302 delete headers[header];
12303 }
12304 });
12305 }
12306
12307 if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
12308 config.withCredentials = defaults.withCredentials;
12309 }
12310
12311 // send request
12312 return sendReq(config, reqData).then(transformResponse, transformResponse);
12313 }
12314
12315 function transformResponse(response) {
12316 // 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