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.

Control visibility using HTMX request headers

Control visibility using HTMX request headers - Spring Boot Tutorial

From the course: HTMX with Thymeleaf in Spring Boot

Control visibility using HTMX request headers

- [Instructor] With 04-01_begin/records-management open in IntelliJ, let's talk about HTMX request headers and how we can use them to influence your application's behavior. We've added some extra timely fragments to our code base under the templates, error directory, and also some updates to the GlobalExceptionHandler to resolve two different templates if a 404 occurs. This will become important later on. Let's go ahead and start the application by running the mvn spring-boot:run command in the terminal. And then when the application is complete, open the browser and let's log in. Enter the username and password. On the Dashboard page that loads, let's right-click on the Browser tab and select Inspect. Click on the Network tab. Now, go ahead and click the update password pencil. On the network, you should see an edit-password request. Go ahead and click on this for some details. The first column you see shows the headers. These are the headers connected to the getRequest of edit…

Contents