Hi guys,
I am developing REST api for our project at the moment and decided to build it as a module in Yii. Everything is working great so far, and Yii is really great help in building this API, but I have an issue with sending POST requests to the API.
Basically there are 2 scenarios.
-
I have a extension in my Chrome browser (in fact 2 extensions) “REST client” which allows me to do quick calls to the API to test it. All other requests, including PUT and DELETE, work great, but if I try to send POST request, I don’t receive any data in API.
-
If I send data through simple HTML form with method set to POST, API receives all data without problem.
So the main problem is, that in scenario 1, if I print out $_POST its empty. but in scenario 2 all sent data are there. I would have blamed it on the chrome extension, but its not just one, and I have tried REST client on my android phone, small app, and the same problem.
Just to note, I have disabled CSRF verification for post calls, so that is not the problem.
Any ideas?
Thanks