mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-17 23:19:06 +00:00
Add query param to complete decorator test.
This commit is contained in:
parent
6578de4615
commit
d321e1de8d
@ -10,8 +10,8 @@ struct User {
|
||||
name: String
|
||||
}
|
||||
|
||||
#[post("/<name>", format = "application/json", form = "<user>", rank = 2)]
|
||||
fn get(name: &str, user: User, cookies: &Cookies) -> &'static str { "hi" }
|
||||
#[post("/<name>?<query>", format = "application/json", form = "<user>", rank = 2)]
|
||||
fn get(name: &str, query: User, user: User, cookies: &Cookies) -> &'static str { "hi" }
|
||||
|
||||
fn main() {
|
||||
let _ = routes![get];
|
||||
|
Loading…
Reference in New Issue
Block a user