2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Adding support for URLSearchParams

This commit is contained in:
Nick Uraltsev
2016-05-07 12:26:28 -07:00
parent ea375220a2
commit f20490eb6b
10 changed files with 108 additions and 20 deletions
+12
View File
@@ -0,0 +1,12 @@
'use strict';
var utils = require('../utils');
module.exports = function normalizeHeaderName(headers, normalizedName) {
utils.forEach(headers, function processHeader(value, name) {
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
headers[normalizedName] = value;
delete headers[name];
}
});
};