Yes, it's possible, see:
http://book.cakephp.org/2.0/en/development/rest.html
http://book.cakephp.org/2.0/en/core-libraries/components/request-handling.html
Use ResquetHandler::respondAs('json') in your
AppController::beforeFilter, all requests results a json.
You need define response using $this->set('_serialize') in yours actions of
controllers.
On Wednesday, February 25, 2015, Sven Mäurer <[email protected]> wrote:
> What are the best REST API server plugins? First of all I don't want to
> have the API methods in the controller I use for my web application and I
> want an URL like www.mydomain.de/api/v1/posts/
> If possible also no view files, just directly encoded json.
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <javascript:_e(%7B%7D,'cvml','cake-php%[email protected]');>.
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>
--
Atenciosamente,
Rafael F. Queiroz
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.