Skip to content

Commit 56cfcb6

Browse files
authored
Document Axios header configuration for AJAX
Added Axios information regarding the X-Requested-With header.
1 parent 27a2d72 commit 56cfcb6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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)