Salvo 0.24.2 发布, 简单强大的 Rust Web 框架
更新内容: 添加了 test 模块, 方便单元测试, 比起之前使用 http::Request::builder 构建 Request 请求简洁很多. 添加解析 Request 请求数据到强类型的功能, 并且支持多数据源组合. 详细介绍 Salvo 是极其简单且功能强大的框架 Handler use salvo::prelude::*; #[fn_handler] async fn hello_world(_req: &mut Request, _depot: &mut Depot, res: &mut Response) { res.render(Text::Plain("Hello World")); } 中间件 use salvo::http::header::{self, HeaderValue}; use salvo::prelude::*; #[fn_handler] async fn add_header(res: &mut Response) { res.headers_mut() .insert(hea...








