public function serve(ResponseInterface $response, $cookies = [])
    {
        if (headers_sent($file, $line)) {
            throw new HeadersSentException(
                'Headers already sent in ' . $file . ' on line ' . $line
            );
        }
        $this->triggerEvent('serve', new \Jivoo\Event($this, [
            'response' => $response,
            'cookies' => $cookies
        ]));
        $this->serveStatus($response);
        $this->serveCookies($cookies);
        $this->serveHeaders($response);
        $this->serveBody($response, $this->compression);
        $this->triggerEvent('served', new \Jivoo\Event($this, [
            'response' => $response,
            'cookies' => $cookies
        ]));
    }