Skip to main content

post

Attribute Macro post 

Source
#[post]
Expand description

Define a POST route handler

§Example

#[post("/users")]
async fn create_user(body: Json<CreateUser>) -> Json<User> {
    // handler code
}