Comparing
#17 with
#19
Content
This article will explain how to create a REST API with the Yii framework.
## Information about REST
A good introduction about implementing REST service with PHP can be found on [http://www.gen-x-design.com](
https://web.archive.org/web/20130910164802/http://www.gen-x-design.com/archives/create-a-rest-api-with-php/).
## Usefull Tools[...]
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')
{[...]