Skip to main content

get

Attribute Macro get 

Source
#[get]
Expand description

Define a GET route handler

§Example

#[get("/users/:id")]
async fn get_user(path: Path<String>) -> Json<User> {
    // handler code
}