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