-
Notifications
You must be signed in to change notification settings - Fork 10
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
Responders #5
Responders #5
Conversation
Awesome, thanks! Taking on a serde dependency for the feature is unfortunate, but looks like it will be necessary with the arbitrary data htmx accepts in some of the headers. I'm almost thinking we allow This would allow responders to be included in the core library, which seems preferable to me. Thoughts? Something else to note is that My initial thought is to maybe change it so feature-gated items have to be explicitly called (eg. An alternative would be to remove the top-level exports and require explicit imports by default (eg. Renaming is also an option, but I think maintaining 1:1 naming with the htmx header names is ideal. Special casing I have to think about the error handling some more, but this seems to be the best way at present. Looks good so far, though! |
I like the approach of implementing basic versions of As for the ambiguous naming, I think that a |
I agree here. |
This all looks pretty good to me, everything seems to work as expected from the testing I've done. Thanks for your work on this! |
Hello, sorry for the delay.
This is the first WIP implementation of responders as mentioned in #4.
I`m going to improve the current implementation but thought it might be good if you can see what I'm up to.
I've implemented the responders similar to the existing extractors to provide a consistent usage of this lib.
The HX-Location header needs more work, the others I would consider relatively finished.
There are still a few other things I'm not completely happy with, but I currently don't see a better way (Error handling, usage of serde + serde_json).
And of course the documentation in Readme.md is still missing.
Greetings,
Paul