1
0
mirror of https://github.com/actix/actix-website synced 2024-12-04 04:31:55 +01:00
actix-website/examples/url-dispatch/src/main.rs

29 lines
495 B
Rust
Raw Normal View History

pub mod cfg;
pub mod dhandler;
pub mod minfo;
pub mod norm;
pub mod norm2;
pub mod path;
pub mod path2;
pub mod pbuf;
pub mod pred;
pub mod pred2;
pub mod resource;
pub mod scope;
pub mod url_ext;
pub mod urls;
2018-05-24 19:13:55 +02:00
// <main>
2019-06-17 02:19:25 +02:00
use actix_web::{web, App, HttpRequest, HttpResponse};
2018-05-24 19:13:55 +02:00
2019-06-17 08:08:42 +02:00
fn index(_req: HttpRequest) -> HttpResponse {
2018-05-24 19:13:55 +02:00
unimplemented!()
}
fn main() {
App::new()
2019-06-17 02:19:25 +02:00
.route("/user/{name}", web::get().to(index))
2019-06-17 10:12:11 +02:00
.route("/user/{name}", web::post().to(index));
2018-05-24 19:13:55 +02:00
}
// </main>