get_api

Attribute Macro get_api 

Source
#[get_api]
Expand description

§Syntax

#[get_api("path"[, attributes])]

§Attributes

  • "path": Raw literal string with path for which to register handler.

§Examples

#[get_api("/")]
async fn example() -> impl IntoResponse {
    "hello world"
}