views:

628

answers:

2

Hi ,

iam trying to write an short Rest Service with Zend Framework. But the documentation is not the best at this Part.

I have an ApiController extended Zend_Rest_Controller with all needed abstract methods. My goal is to get 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 post array on Server side. Does i have to use Zend Rest Server inside the postAction on my ApiController?

If someone has an example how to send and to get the data with Zend Rest, that would be great.

A: 

Maybe this tutorial Create RESTful Applications Using The Zend Framework can help.

Gordon
A: 

Have you tried setting it to access 127.0.0.1 rather than localhost? I know this can cause issues sometimes.

Mike