Phprest\Application::head PHP Method

head() public method

Add a HEAD route
public head ( string $route, mixed $action ) : void
$route string
$action mixed
return void
    public function head($route, $action)
    {
        $this->router->addRoute('HEAD', $route, $action);
    }

Usage Example

Esempio n. 1
0
 public function testHead()
 {
     $this->app->head('/test-head', 'test-handler');
     $this->assertEquals(['method' => 'HEAD', 'route' => '/test-head', 'handler' => 'test-handler'], $this->app->getRouter()->getRoutingTable()[0]);
 }