I am trying to write a short Rest service with the Zend Framework. But the documentation is not the best in this part.
I have an advanced Zend_Rest_Controller with ApiController with all the necessary abstract methods. My goal is to get the Post data and return something.
My client looks like this:
public function indexAction() { $url = 'http://localhost/url/public/api'; $client = new Zend_Rest_Client(); $client->setUri($url); $client->url = 'http://www.google.de'; $result = $client->post(); }
but the provided "$ client-> url" is not inside the server-side post array. Should I use Zend Rest Server inside postAction on my ApiController?
If someone has an example of how to send and receive data with Zend Rest, that would be great.
rest php zend-framework
opHASnoNAME
source share