Skip to main content

post

Attribute Macro post 

Source
#[post]
Expand description

Shorthand for #[orpc::route(method = "POST", path = "...")].

§Syntax

#[orpc::post("/planet/create")]
async fn create_planet(
    State(db): State<Db>,
    Json(input): Json<CreateInput>,
) -> Result<Json<Planet>, AppError> {
    // ...
}