(config)
| 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 |
nothing calls this directly
no test coverage detected