Skip to main content

head

Attribute Macro head 

Source
#[head]
Expand description

Registers a function as a HEAD route handler.

§Example

use sunweb::{head, HTTPRequest, Response};

#[head("/ping")]
fn ping(req: HTTPRequest) -> Response {
    Response::no_content()
}