mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-04-24 00:00:03 +08:00
feat: #158 support removing headers which were previously set via "setHeader"
This commit is contained in:
@@ -58,7 +58,12 @@ module.exports = function init(exec, cookieHandler, urlUtil, helpers, globalConf
|
||||
helpers.checkForInvalidHeaderValue(value);
|
||||
|
||||
globalConfigs.headers[host] = globalConfigs.headers[host] || {};
|
||||
globalConfigs.headers[host][header] = value;
|
||||
|
||||
if (value === null) {
|
||||
delete globalConfigs.headers[host][header];
|
||||
} else {
|
||||
globalConfigs.headers[host][header] = value;
|
||||
}
|
||||
}
|
||||
|
||||
function getDataSerializer() {
|
||||
|
||||
Reference in New Issue
Block a user