diff --git a/Annotation/Route/Cmd.php b/Annotation/Route/Cmd.php new file mode 100644 index 00000000..f6062d6f --- /dev/null +++ b/Annotation/Route/Cmd.php @@ -0,0 +1,51 @@ +getRouter(); + + $router->addRoute($this->cmd, $handler, Request::HTTP_CMD); + + return $router; + } + + +} diff --git a/HttpServer/Http/Request.php b/HttpServer/Http/Request.php index f3eaba60..a7e237ea 100644 --- a/HttpServer/Http/Request.php +++ b/HttpServer/Http/Request.php @@ -67,6 +67,7 @@ class Request extends HttpService const HTTP_POST = 'post'; const HTTP_GET = 'get'; + const HTTP_CMD = 'cmd'; const HTTP_SOCKET = 'sw::socket';