1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 15:39:02 +02:00

update url-dispatch examples

This commit is contained in:
Nikolay Kim
2018-05-24 10:13:55 -07:00
parent 2efb3dc0bd
commit 842c877da2
19 changed files with 348 additions and 249 deletions

View File

@ -0,0 +1,16 @@
// <resource>
use actix_web::{http::Method, App, HttpRequest, HttpResponse};
fn index(req: HttpRequest) -> HttpResponse {
unimplemented!()
}
fn main() {
App::new()
.resource("/prefix", |r| r.f(index))
.resource("/user/{name}", |r| {
r.method(Method::GET).f(|req| HttpResponse::Ok())
})
.finish();
}
// </resource>