#![allow(unused)] use axum::{ extract::State, response::{Html, IntoResponse}, routing::get, }; use axum_routing_htmx::{hx_get, hx_post, HtmxRouter}; #[hx_get("/title")] async fn title_handler(State(state): State) -> String { format!("Hello from {state}!") } #[hx_post("/button/:id")] async fn button_handler(id: u32) -> String { format!("You clicked button #{id}!") } async fn index_handler() -> impl IntoResponse { let title = title_handler(); let button = button_handler(); Html(format!( "