I am very newbie in zend framework, I send some data to an action with post method by this way:
$config = array(
'adapter' => 'Zend_Http_Client_Adapter_Curl',
);
$client = new Zend_Http_Client('http://example.com/api/last-news', $config);
$client->setParameterPost('name' ,'value');
$dataresult = $client->request('POST')->getBody();
when In lastNewsAction()
action in ApiController.php
I use var_dump($_POST)
it's passed me empty array, but when I send those data to a simple file out of framework(something like http://example.com/test.php) the $_POST
has correct value. SO How can I retrieve $_POST
variable in an action?