Enable router with JSON requests

This commit is contained in:
Kijin Sung 2020-07-02 16:42:12 +09:00
parent 96950161f1
commit 84b7e9f8eb

View file

@ -237,7 +237,7 @@ class Context
// Set information about the current request.
self::_checkGlobalVars();
self::setRequestMethod();
if (in_array(self::$_instance->request_method, array('GET', 'POST')))
if (in_array(self::$_instance->request_method, array('GET', 'POST', 'JSON')))
{
$method = $_SERVER['REQUEST_METHOD'] ?: 'GET';
$url = $_SERVER['REQUEST_URI'];