POST params are empty in Zend_Rest_Controller

477 Views Asked by At

I'm using Zend_Rest_Controller to implement a RESTful API.

The GET action works fine, for example when I make the /user/id/1 request the :id parameter is present when I use $request->getParams().

However, when I make a POST request to /user, the postAction() is called just fine but there is no POST data in $request->getParams() or $request->getPost(). $request->getRawBody() shows that they are getting to the server fine though.

Is there any reason why ZF might not be populating the request object with these params? How do I access them?

1

There are 1 best solutions below

2
slash28cu On

Double check the content type on the http headers of the request. Should be multipart/form-data.