6

I am trying to write a 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.

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.