2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Better formatting

This commit is contained in:
Matt Zabriskie
2015-12-11 12:38:23 -07:00
parent 908d12b8ef
commit 085f95f9ce
+2 -1
View File
@@ -98,7 +98,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
} }
// Add headers to the request // Add headers to the request
if(!xDomain) if (!xDomain) {
utils.forEach(requestHeaders, function (val, key) { utils.forEach(requestHeaders, function (val, key) {
// Remove Content-Type if data is undefined // Remove Content-Type if data is undefined
if (!data && key.toLowerCase() === 'content-type') { if (!data && key.toLowerCase() === 'content-type') {
@@ -109,6 +109,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
request.setRequestHeader(key, val); request.setRequestHeader(key, val);
} }
}); });
}
// Add withCredentials to request if needed // Add withCredentials to request if needed
if (config.withCredentials) { if (config.withCredentials) {