Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

xhaggi
Copy link
Contributor

@xhaggi xhaggi commented Oct 16, 2023

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.

@xhaggi xhaggi changed the title Add support for HX-Replace-Url response header Add support for HX-Replace-Url response header in HtmxResponse Oct 16, 2023
@xhaggi xhaggi force-pushed the hx-replace-url branch 2 times, most recently from 1b13971 to ea2af55 Compare October 16, 2023 12:19
@wimdeblauwe wimdeblauwe added this to the 3.1.0 milestone Oct 16, 2023
@wimdeblauwe wimdeblauwe merged commit f92ab81 into wimdeblauwe:main Oct 16, 2023
1 check passed
@xhaggi xhaggi deleted the hx-replace-url branch October 16, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants