Skip to content

Commit

Permalink
Fixed posting FormData in browser environment by reverting axios#3785;
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS committed Apr 26, 2022
1 parent bcb166e commit cba49d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/adapters/xhr.js
Expand Up @@ -27,6 +27,10 @@ module.exports = function xhrAdapter(config) {
}
}

if (utils.isFormData(requestData)) {
delete requestHeaders['Content-Type']; // Let the browser set it
}

var request = new XMLHttpRequest();

// HTTP basic authentication
Expand Down

0 comments on commit cba49d4

Please sign in to comment.