From the course: HTMX with Thymeleaf in Spring Boot
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Demonstrate hx-post and hx-delete with Spring Security - Spring Boot Tutorial
From the course: HTMX with Thymeleaf in Spring Boot
Demonstrate hx-post and hx-delete with Spring Security
- [Instructor] With 03-09_begin/records-management open in IntelliJ, let's continue to talk through and consider briefly some common HTTP verbs available with htmx. We've already been using hx-get quite often. In fact, if we look at the header.html under Resources, Templates, Fragments, header.html, we'll see around line 57 in the anchor tag that it has both a th:href and a th:hx-get. Both implicitly use HTTP GET by default. The th:hx-get uses htmx to make an AJAX call to load the content. As mentioned previously, this is considered a safe method in that there should be no side effect of modifying data behind the scenes. Because hx-get does not modify data, Spring Security waives some of the security requirements concerning CORS. Spring Security does not waive security requirements concerning PATCH, POST, PUT, and DELETE requests. Let's take a look at the editable-email-form.html located under Person, Modify. Even though here there is no CSRF token specified, Thymeleaf will insert a…
Contents
-
-
-
-
-
(Locked)
Learn to use HTMX swapping5m 11s
-
(Locked)
Differentiate between inner and outerHTML swapping10m 51s
-
(Locked)
Decide when to use hx-swap: afterbegin and beforebegin8m 11s
-
(Locked)
Implement hx-on functionality to listen for hx-swap events9m 24s
-
(Locked)
hx-swap: beforeend, afterend, and deleting elements5m 11s
-
(Locked)
Implement hx-swap and use view transition API13m
-
(Locked)
Learn to use hx-swap scrolling modifiers7m 6s
-
(Locked)
Understand HTTP verbs with hypermedia6m 18s
-
(Locked)
Demonstrate hx-post and hx-delete with Spring Security11m 12s
-
(Locked)
Demonstrate hx-patch and hx-put with Spring Security9m 56s
-
(Locked)
-
-
-
-
-