diff options
Diffstat (limited to 'modules/rest')
-rw-r--r-- | modules/rest/controllers/rest.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php index 0a39e02c..d1404b29 100644 --- a/modules/rest/controllers/rest.php +++ b/modules/rest/controllers/rest.php @@ -68,17 +68,13 @@ class Rest_Controller extends Controller { private function _normalize_request($args=array()) { $method = strtolower($this->input->server("REQUEST_METHOD")); + $request = new stdClass(); + foreach (array_keys($this->input->get()) as $key) { + $request->$key = $this->input->get($key); + } if ($method != "get") { - $request = $this->input->post("request", null); - if ($request) { - $request = json_decode($request); - } else { - $request = new stdClass(); - } - } else { - $request = new stdClass(); - foreach (array_keys($this->input->get()) as $key) { - $request->$key = $this->input->get($key); + foreach (array_keys($this->input->post()) as $key) { + $request->$key = $this->input->post($key); } } |