
Sign up to save your podcasts
Or


Want to use POST requests in ajax, and submit forms from anywhere on the page?
As promised in the episode, here are three ways to set up your CSRF token headers:
1. Like normal in your forms:
(the regular html way works with htmx, of course)
2. Javascript
(add this to the bottom of your so that EVERY request gets the right headers. I love this one!)
hx-headers
(add this attribute along with your hx-post)
By Lazarus5
66 ratings
Want to use POST requests in ajax, and submit forms from anywhere on the page?
As promised in the episode, here are three ways to set up your CSRF token headers:
1. Like normal in your forms:
(the regular html way works with htmx, of course)
2. Javascript
(add this to the bottom of your so that EVERY request gets the right headers. I love this one!)
hx-headers
(add this attribute along with your hx-post)

1,890 Listeners

586 Listeners

17 Listeners

140 Listeners

14,662 Listeners

6 Listeners

2 Listeners

13 Listeners