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

Function serverRequest

test/angular/1.2/angular.js:8157–8176  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

8155 config.method = uppercase(config.method);
8156
8157 var serverRequest = function(config) {
8158 headers = config.headers;
8159 var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);
8160
8161 // strip content-type if data is undefined
8162 if (isUndefined(reqData)) {
8163 forEach(headers, function(value, header) {
8164 if (lowercase(header) === 'content-type') {
8165 delete headers[header];
8166 }
8167 });
8168 }
8169
8170 if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
8171 config.withCredentials = defaults.withCredentials;
8172 }
8173
8174 // send request
8175 return sendReq(config, reqData, headers).then(transformResponse, transformResponse);
8176 };
8177
8178 var chain = [serverRequest, undefined];
8179 var promise = $q.when(config);

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