axum-folder-router/examples/simple/api/route.rs
2025-04-14 15:36:01 +02:00

10 lines
222 B
Rust

use axum::response::{Html, IntoResponse};
pub async fn get() -> impl IntoResponse {
Html("<h1>Hello World!</h1>").into_response()
}
pub async fn post() -> impl IntoResponse {
"Posted successfully".into_response()
}