robertwayne / axum-htmx

A set of htmx extractors, responders, and request guards for axum.
Apache License 2.0
186 stars 10 forks source link

How to actually use responders? #22

Closed its-danny closed 3 months ago

its-danny commented 3 months ago

This may be more of an Axum question, but I can’t figure it out. I have a handler that, at the moment, returns impl IntoResponse; either (StatusCode, String) or Redirect.

I need to replace the Redirect with HxRedirect, but it doesn’t implement IntoResponse.

It’s not clear to me how to, like, return an empty response with the headers set via HxRedirect.