(config)
| 12441 | } |
| 12442 | |
| 12443 | function serverRequest(config) { |
| 12444 | var headers = config.headers; |
| 12445 | var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest); |
| 12446 | |
| 12447 | // strip content-type if data is undefined |
| 12448 | if (isUndefined(reqData)) { |
| 12449 | forEach(headers, function(value, header) { |
| 12450 | if (lowercase(header) === 'content-type') { |
| 12451 | delete headers[header]; |
| 12452 | } |
| 12453 | }); |
| 12454 | } |
| 12455 | |
| 12456 | if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) { |
| 12457 | config.withCredentials = defaults.withCredentials; |
| 12458 | } |
| 12459 | |
| 12460 | // send request |
| 12461 | return sendReq(config, reqData).then(transformResponse, transformResponse); |
| 12462 | } |
| 12463 | |
| 12464 | function transformResponse(response) { |
| 12465 | // make a copy since the response must be cacheable |
nothing calls this directly
no test coverage detected