Skip to content

Commit e66d025

Browse files
authored
docs: document Axios header configuration for AJAX (#10069)
Added Axios information regarding the X-Requested-With header.
1 parent 1e9a2b5 commit e66d025

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

user_guide_src/source/general/ajax.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ Fetch API
2525
}
2626
});
2727
28+
Axios
29+
=====
30+
31+
If you are using Axios, it also does not include the ``X-Requested-With`` header by default.
32+
You can add it globally as follows:
33+
34+
.. code-block:: javascript
35+
36+
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
37+
38+
2839
jQuery
2940
======
3041

0 commit comments

Comments
 (0)