From de5e006142cb428e712d00c05bda17c3c4c83ef1 Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 9 May 2022 20:16:21 +0200 Subject: [PATCH] Revert "The content type option is left to the developer (#4550)" (#4699) This reverts commit 9579bad1d38fe5eb6e191eb582dd3f55f4d1489a. --- lib/adapters/xhr.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index 76784f3..c22783f 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -28,10 +28,8 @@ module.exports = function xhrAdapter(config) { } } - - if (utils.isFormData(requestData) && utils.isStandardBrowserEnv() && !config.defineContentType ) { - // Let the browser set the content type should it not be set - delete requestHeaders['Content-Type']; + if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) { + delete requestHeaders['Content-Type']; // Let the browser set it } var request = new XMLHttpRequest();