Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeIgniter Rest Server dealing with JSON POST request

I am trying to make my JSON POST request working, when I set it to form-encoded request I can display all the ?args=values&args=values by $this->response($this->post(),200); but when I change id to json-encoded POST input, I get as response [] - why is that?

like image 833
czaku Avatar asked Dec 19 '11 23:12

czaku


1 Answers

There is a difference between POST parameters and a HTTP body... well, at least as far as PHP is concerned.

You want to look at $this->request->body.

like image 109
Phil Sturgeon Avatar answered Nov 06 '22 04:11

Phil Sturgeon