How do I handle json data sent as an HTTP Post to a cakephp app?

后端 未结 2 1420
日久生厌
日久生厌 2021-01-05 18:10

If I\'m being sent an HTTP Post where the body of the http request is just a UTF8 encoded string, how do I access that data in my cakephp controller? It appears that $this->

2条回答
  •  迷失自我
    2021-01-05 18:32

    You can use these simplest way :

    $data = $this->request->input ( 'json_decode', true) ;
    

提交回复
热议问题