5

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?

1 Answer 1

9

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.