public function before() { parent::before(); $this->json['code'] = API::NO_ERROR; $this->fields = $this->param('fields', array()); if (strpos($this->request->headers('content-type'), 'application/json') !== FALSE) { $data = json_decode($this->request->body(), TRUE); if (!is_array($data)) { parse_str($this->request->body(), $data); } $this->request->post($data); } }
public function before() { parent::before(); }