If an HTTP message is sent to me, where the body of the HTTP request is only a UTF8 encoded string, how can I access this data in my cakephp controller? It looks like $ this-> params contains only the following:
{
"pass":[],
"named":[],
"controller":"users",
"action":"checkin",
"plugin":null,
"url":{
"ext":"json",
"url":"users\/checkin.json"
},
"form":[],
"isAjax":false
}
Published data look something like this:
{
"sessionkey":"somecrazykey",
"longitude":"-111.12345",
"latitude":"33.12345",
"reqtype":"checkin",
"location":"the mall",
"public":"true"
}
source
share