I'm testing the restful service built with zend framework. I'm using the command below to test it (learned from this post).
curl -v -H "Content-Type: application/json" -X GET -d '{"locationId":"33","limit":"5","offset":"0"}' \ http://localhost/api/review
But when I fetch the request body in Zend using $payload = $this->getRequest()->getRawBody();
, the var_dump($payload) returns "'{locationId:33,limit:5,offset:0}'"
, where the double quotation marks are removed so that I can't decode it into array.
What's reason of it? Please help. Thank s in advance.