I'm using codeigniter with REST_Controller library. And so far I've been using $this->input->post()
to get the values sent by POST request.
However, some values are sent in the body as a json encoded string, which I am not able so see with the $this->input->post()
Now I was able to access the json string using file_get_contents('php://input')
but this way doesn't seem to be safe out of the box I find it highly unlikely that codeigniter wouldn't have this figured out.
So my question is: is file_get_contents('php://input')
really the only way to access these variables in codeigniter or is there a more framework defined way to do it?