mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
* Fixed posting FormData in browser environment by reverting #3785; * Added ability to keep `Content-Type` header in non-standard browser environments; * Added browser test of FormData posting using external HTTP service (https://httpbin.org/post); Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -27,6 +27,10 @@ module.exports = function xhrAdapter(config) {
|
||||
}
|
||||
}
|
||||
|
||||
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
|
||||
delete requestHeaders['Content-Type']; // Let the browser set it
|
||||
}
|
||||
|
||||
var request = new XMLHttpRequest();
|
||||
|
||||
// HTTP basic authentication
|
||||
|
||||
Reference in New Issue
Block a user