2
0
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:
Xianming Zhong
2020-06-09 02:52:45 +08:00
committed by GitHub
parent 487941663b
commit 0d69a79c81
10 changed files with 413 additions and 154 deletions
-7
View File
@@ -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) {