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

@HxPushUrl(true) now retreives the path from the request #129

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

tschuehly
Copy link
Contributor

When using @HxPushUrl without a value it pushes true in the url, instead of the fetched URL

image

Now the path gets retreived from the request.

Modified setHxPushUrl() method to include HttpServletRequest and conditionally set HX-Push-Url header based on request URI and query parameters. Updated test cases and test controller to reflect these changes and ensure correct functionality.
Refactored the HtmxHandlerInterceptor to consistently handle Htmx headers by considering query strings and consolidating logic into helper methods. Also added test cases for HxPushUrl and HxReplaceUrl with both path and boolean values, ensuring robust validation of headers. Modified HxReplaceUrl annotation to have a default value of TRUE.
@tschuehly
Copy link
Contributor Author

@xhaggi @wimdeblauwe
Added changes

@wimdeblauwe wimdeblauwe added this to the 3.5.1 milestone Sep 10, 2024
@wimdeblauwe wimdeblauwe merged commit 7d08c45 into wimdeblauwe:main Sep 10, 2024
2 checks passed
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.

3 participants