mirror of
https://github.com/actix/actix-website
synced 2025-01-22 16:15:56 +01:00
update routing example
This commit is contained in:
parent
3116e2e4e9
commit
c28b2fc492
@ -130,8 +130,8 @@ fn register(data: Form<Register>) -> impl Responder {
|
|||||||
"Hello from the index page"
|
"Hello from the index page"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hello(req: HttpRequest) -> impl Responder {
|
fn hello(path: Path<String>) -> impl Responder {
|
||||||
format!("Hello {}!", req.match_info().get("name").unwrap())
|
format!("Hello {}!", *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user