1
0
mirror of https://github.com/actix/actix-website synced 2025-03-15 20:53:07 +01:00

16 lines
354 B
Rust
Raw Normal View History

2018-05-24 10:13:55 -07:00
// <minfo>
use actix_web::{App, HttpRequest, Result};
2018-07-21 05:21:41 -07:00
fn index(req: &HttpRequest) -> Result<String> {
2018-05-24 10:13:55 -07:00
let v1: u8 = req.match_info().query("v1")?;
let v2: u8 = req.match_info().query("v2")?;
Ok(format!("Values {} {}", v1, v2))
}
fn main() {
App::new()
.resource(r"/a/{v1}/{v2}/", |r| r.f(index))
.finish();
}
// </minfo>