Skip to content

Commit b54c035

Browse files
committed
docs: add how to add X-Requested-With header with htmx
1 parent 7a631a1 commit b54c035

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
@@ -52,3 +52,14 @@ React
5252
.. code-block:: javascript
5353
5454
axios.get("your url", {headers: {'Content-Type': 'application/json'}})
55+
56+
htmx
57+
=====
58+
59+
You can use `ajax-header <https://htmx.org/extensions/ajax-header/>`_ extension.
60+
61+
.. code-block:: html
62+
63+
<body hx-ext="ajax-header">
64+
...
65+
</body>

0 commit comments

Comments
 (0)