protected function sendBody($body):void
    {
        if (is_resource($body)) {
            fpassthru($body);
            fclose($body);
        }
        else {
            echo $body;
        }
    }