wimdeblauwe / htmx-spring-boot

Spring Boot and Thymeleaf helpers for working with htmx
Apache License 2.0
423 stars 41 forks source link

Add support for HX-Replace-Url response header in HtmxResponse #86

Closed xhaggi closed 8 months ago

xhaggi commented 8 months ago

Instead of passing "false" to HtmxResponse.Builder#pushUrl or HtmxResponse.Builder#replaceUrl, a new convenience method preventHistoryUpdate() has been added. Since htmx only considers one of the headers HX-Push-Url or HX-Replace-Url, and in exactly that order, it was obvious to offer such a method.