diff --git a/HttpServer/Http/Request.php b/HttpServer/Http/Request.php index cb7a3e37..5cb691f5 100644 --- a/HttpServer/Http/Request.php +++ b/HttpServer/Http/Request.php @@ -321,7 +321,8 @@ class Request extends Application */ public function getMethod() { - $method = $this->headers->getHeader('request_method'); + $method = $this->headers->get('request_method'); + var_dump($this->headers); if (empty($method)) { return 'get'; } diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 19db1283..2f9cf063 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -52,6 +52,7 @@ class Router extends Application implements RouterInterface */ public function addRoute($path, $handler, $method = 'any') { + $method = strtolower($method); if (!isset($this->nodes[$method])) { $this->nodes[$method] = []; }