This commit is contained in:
2020-09-21 17:30:13 +08:00
parent e1a5d74d8a
commit 07ec676e78
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -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';
}
+1
View File
@@ -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] = [];
}