mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Refactor mergeConfig without utils.deepMerge (#2844)
* Adding failing test * Fixing #2587 default custom config persisting * Adding Concat keys and filter duplicates * Fixed value from CPE * update for review feedbacks * no deepMerge * only merge between plain objects * fix rename * always merge config by mergeConfig * extract function mergeDeepProperties * refactor mergeConfig with all keys, and add special logic for validateStatus * add test for resetting headers * add lots of tests and fix a bug * should not inherit `data` * use simple toString * revert #1845 Co-authored-by: David Tanner <david.tanner@lifeomic.com> Co-authored-by: Justin Beckwith <justin.beckwith@gmail.com>
This commit is contained in:
@@ -47,13 +47,6 @@ 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) {
|
||||
|
||||
Reference in New Issue
Block a user