|
use axum::{extract::Path, http::StatusCode, response::IntoResponse};
|
|
|
|
pub(crate) async fn greet(Path(name): Path<String>) -> impl IntoResponse {
|
|
let greeting = String::from("He's dead, ") + name.as_str();
|
|
let greeting = greeting + &String::from("!\n");
|
|
(StatusCode::OK, greeting)
|
|
}
|