改名
This commit is contained in:
@@ -321,7 +321,8 @@ class Request extends Application
|
|||||||
*/
|
*/
|
||||||
public function getMethod()
|
public function getMethod()
|
||||||
{
|
{
|
||||||
$method = $this->headers->getHeader('request_method');
|
$method = $this->headers->get('request_method');
|
||||||
|
var_dump($this->headers);
|
||||||
if (empty($method)) {
|
if (empty($method)) {
|
||||||
return 'get';
|
return 'get';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class Router extends Application implements RouterInterface
|
|||||||
*/
|
*/
|
||||||
public function addRoute($path, $handler, $method = 'any')
|
public function addRoute($path, $handler, $method = 'any')
|
||||||
{
|
{
|
||||||
|
$method = strtolower($method);
|
||||||
if (!isset($this->nodes[$method])) {
|
if (!isset($this->nodes[$method])) {
|
||||||
$this->nodes[$method] = [];
|
$this->nodes[$method] = [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user