mirror of https://github.com/rwf2/Rocket.git
Updated README to use method specific decorator.
This commit is contained in:
parent
eabb5169de
commit
df9b71bee7
|
@ -13,7 +13,7 @@ application:
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
use rocket::Rocket;
|
use rocket::Rocket;
|
||||||
|
|
||||||
#[route(GET, path = "/<name>/<age>")]
|
#[GET(path = "/<name>/<age>")]
|
||||||
fn hello(name: &str, age: u8) -> String {
|
fn hello(name: &str, age: u8) -> String {
|
||||||
format!("Hello, {} year old named {}!", age, name)
|
format!("Hello, {} year old named {}!", age, name)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue