public function sendHeader($message, $code = null)
    {
        if (!($this->request instanceof WebRequest)) {
            return;
        }
        
        if ($code !== null) {
            header($message, true, $code);
        } else {
            header($message);
        }
    }