mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -47,6 +47,13 @@ module.exports = function dispatchRequest(config) {
|
||||
}
|
||||
);
|
||||
|
||||
// Remove header where value is null
|
||||
utils.forEach(config.headers, function deleteNullValueHeaders(value, key) {
|
||||
if (value === null) {
|
||||
delete config.headers[key];
|
||||
}
|
||||
});
|
||||
|
||||
var adapter = config.adapter || defaults.adapter;
|
||||
|
||||
return adapter(config).then(function onAdapterResolution(response) {
|
||||
|
||||
@@ -294,6 +294,11 @@ function deepMerge(/* obj1, obj2, obj3, ... */) {
|
||||
}
|
||||
}
|
||||
|
||||
var lastArgument = arguments[arguments.length - 1];
|
||||
if (lastArgument === null || typeof lastArgument === 'undefined') {
|
||||
return lastArgument;
|
||||
}
|
||||
|
||||
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||
forEach(arguments[i], assignValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user