mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Adding X-Requested-With header
This commit is contained in:
@@ -25,6 +25,9 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
config.headers || {}
|
||||
);
|
||||
|
||||
// Indicate that request is being made with XHR
|
||||
requestHeaders['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
if (utils.isFormData(data)) {
|
||||
delete requestHeaders['Content-Type']; // Let the browser set it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user