I use the Rocket library and I need to create an endpoint which contains the dynamic parameter "type", a keyword.
I tried something like this but it does not compile:
#[get("/offers?<type>")]
pub fn offers_get(type: String) -> Status {
unimplemented!()
}
compiler error:
error: expected argument name, found keyword `type`
Is it possible to have a parameter named "type" in rocket? I can't rename the parameter because of the specification I'm following.