Revision #19 has been created by Rohit Suthar on Sep 29, 2014, 12:27:03 PM with the memo:
updated example link
« previous (#18)
Changes
Title
unchanged
How-To: Create a REST API
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
REST, API, Tutorial, Backbone
Content
changed
[...]
### Sending the Response
How are the API responses actually sent? Right, we need to implement the _sendResponse method.
This code is borrowed from [http://www.gen-x-design.com/archives/create-a-rest-api-with-php](https://web.archive.org/web/20130910164802/http://www.gen-x-design.com/archives/create-a-rest-api-with-php
/).
```php
private function _sendResponse($status = 200, $body = '', $content_type = 'text/html')
{[...]