MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / serverRequest

Function serverRequest

OpenReservation/wwwroot/Scripts/angular.js:11215–11238  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

11213 : config.paramSerializer;
11214
11215 var serverRequest = function (config) {
11216 var headers = config.headers;
11217 var reqData = transformData(config.data,
11218 headersGetter(headers),
11219 undefined,
11220 config.transformRequest);
11221
11222 // strip content-type if data is undefined
11223 if (isUndefined(reqData)) {
11224 forEach(headers,
11225 function (value, header) {
11226 if (lowercase(header) === 'content-type') {
11227 delete headers[header];
11228 }
11229 });
11230 }
11231
11232 if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
11233 config.withCredentials = defaults.withCredentials;
11234 }
11235
11236 // send request
11237 return sendReq(config, reqData).then(transformResponse, transformResponse);
11238 };
11239
11240 var chain = [serverRequest, undefined];
11241 var promise = $q.when(config);

Callers

nothing calls this directly

Calls 6

transformDataFunction · 0.85
headersGetterFunction · 0.85
isUndefinedFunction · 0.85
forEachFunction · 0.85
lowercaseFunction · 0.85
sendReqFunction · 0.85

Tested by

no test coverage detected