ApiController::sendResponse PHP Method

sendResponse() protected method

Send response.
protected sendResponse ( integer $status, string $body = '' )
$status integer
$body string
    protected function sendResponse($status, $body = '')
    {
        header('HTTP/1.1 ' . $status);
        if ($status == 401) {
            header('WWW-Authenticate: Basic realm="OpenEyes"');
        }
        echo $body;
        Yii::app()->end();
    }