2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

Revert "The content type option is left to the developer (#4550)" (#4699)

This reverts commit 9579bad1d3.
This commit is contained in:
Jay
2022-05-09 20:16:21 +02:00
committed by GitHub
parent ac96144dd3
commit de5e006142
+2 -4
View File
@@ -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();