Attribute Macro route_res

Source
#[route_res]
Expand description

Creates route handler with PATH impl Resource.

Syntax: #[route_res("/")]

#[route_res("/Hello")]
impl Hello {
    fn get(that:Option<Hello>, req: HttpRequest) -> String {
        format!("get Hello !")
    }
    fn post(that:Option<Hello>, req: HttpRequest) -> String {
        format!("post Hello !")
    }
}