// use actix_web::{web, HttpResponse}; use serde::Deserialize; #[derive(Deserialize)] struct FormData { username: String, } async fn index(form: web::Form) -> HttpResponse { HttpResponse::Ok().body(format!("username: {}", form.username)) } // #[actix_rt::main] async fn main() -> std::io::Result<()> { use actix_web::{App, HttpServer}; HttpServer::new(|| App::new().route("/", web::post().to(index))) .bind("127.0.0.1:8088")? .run() .await }