tower-web
tower-web copied to clipboard
Add support for HEAD method – #[head("/")]
It is currently impossible to define a handler for HEAD method.
impl MyApp {
#[head("/")]
fn index(&self) -> Result<String, ()> {
// implementation
}
}
Additionally, HEAD requests should probably match GET as well.
Could you please elaborate on how you see this working? Both methods definitely work with the same resource but responses are different, so should be handlers.