Skip to main content

get

Attribute Macro get 

Source
#[get]
Available on crate feature macros only.
Expand description

Shorthand for #[route(GET, "/path")].

§Example

ⓘ
use rust_web_server::get;

#[get("/healthz")]
fn health(_: &Request, _: &PathParams, _: &ConnectionInfo) -> Response {
    Response::new()
}