mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Better formatting
This commit is contained in:
+2
-1
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user