diff --git a/src/Router.php b/src/Router.php index 231f65b..1a6ca05 100644 --- a/src/Router.php +++ b/src/Router.php @@ -235,6 +235,17 @@ public static function delete(string $pattern, $handler) static::match('DELETE', $pattern, $handler); } + /** + * Add a route with HEAD method + * + * @param string $pattern The route pattern/path to match + * @param string|array|callable The handler for route when matched + */ + public static function head(string $pattern, $handler) + { + static::match('HEAD', $pattern, $handler); + } + /** * Add a route that sends an HTTP redirect *