Skip to content

Commit 5331499

Browse files
authored
Merge pull request #6720 from kenjis/docs-add-htmx-ajax-header
docs: add how to add X-Requested-With header with htmx
2 parents 18206b1 + c8fb20d commit 5331499

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)