(config)
| 13012 | } |
| 13013 | |
| 13014 | function serverRequest(config) { |
| 13015 | var headers = config.headers; |
| 13016 | var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest); |
| 13017 | |
| 13018 | // strip content-type if data is undefined |
| 13019 | if (isUndefined(reqData)) { |
| 13020 | forEach(headers, function(value, header) { |
| 13021 | if (lowercase(header) === 'content-type') { |
| 13022 | delete headers[header]; |
| 13023 | } |
| 13024 | }); |
| 13025 | } |
| 13026 | |
| 13027 | if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) { |
| 13028 | config.withCredentials = defaults.withCredentials; |
| 13029 | } |
| 13030 | |
| 13031 | // send request |
| 13032 | return sendReq(config, reqData).then(transformResponse, transformResponse); |
| 13033 | } |
| 13034 | |
| 13035 | function transformResponse(response) { |
| 13036 | // make a copy since the response must be cacheable |
nothing calls this directly
no test coverage detected