private function send(RequestInterface $request, ResponseInterface $response)
    {
        // Send headers if no headers has been sent before this
        if (!headers_sent()) {
            // Send headers
            $this->sendHeaders($response);
        }

        // Check if we have any content to flush
        if (ob_get_level() > 1) {
            // Flush (send) the buffer that contains output that the application has generated
            while (ob_get_level() >= $this->outputBufferLevel) {
                ob_end_flush();
            }
        }

        // Set buffer level to null
        $this->outputBufferLevel = null;

        // Make sure it wasn't a HEAD request
        if ($request->getMethod() !== 'HEAD') {
            // Send the body to the client by echoing it
            echo $response->getBody();
        }
    }