Currently, HEAD requests can be handled with the following workaround:
use web\frontend\{Handler, Get, Head, View};
#[Handler('/')]
class Home {
#[Head]
public function head() {
$empty= View::named(null);
$empty->context= null;
return $empty;
}
#[Get]
public function index() {
return View::named('home');
}
}
It would be preferrable to have this automatically handled by calling the Get-annotated method and removing its response unless explicitely specified like above.
Currently, HEAD requests can be handled with the following workaround:
It would be preferrable to have this automatically handled by calling the
Get
-annotated method and removing its response unless explicitely specified like above.