I am getting get parameters using this
$this->params()->fromQuery('KEY');
I found two way to get POST parameters
//first way
$this->params()->fromPost('KEY', null);
//second way
$this->getRequest()->getPost();
Both of this working in "POST" method but now in a "PUT" method if I pass values as a post parameters.
How I can get post parameters in "PUT" method?
I guess the right way of doing that is by using Zend_Controller_Plugin_PutHandler:
// you can put this code in your projects bootstrap
$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new Zend_Controller_Plugin_PutHandler());
and then you can get your params via getParams()
foreach($this->getRequest()->getParams() as $key => $value) {
...
}
or simply
$this->getRequest()->getParam("myvar");