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