Closed Moanrisy closed 11 months ago
Hey, thanks for pointing this out.
This is because HxResponseTrigger only impls IntoResponseParts
, and we need to pass that before the body would consume (in this case).
I've updated the README with the correct code - I also made a note of this in the documentation!
use axum_htmx::HxResponseTrigger;
async fn index() -> (HxResponseTrigger, &'static str) {
(
HxResponseTrigger::normal(["my-event", "second-event"]),
"Hello, world!",
)
}
error on here
.route("/index", get(index))
my dependencies [dependencies]