protected function setHeader($key, $value)
    {
        if (SERVER_MODE === 'swoole') {
            $GLOBALS['__$response']->header($key, $value);
        } else {
            if (!headers_sent()) {
                header($key . ': '. $value);
            }
        }
    }
protected function setHeader($key, $value)
    {
        if (SERVER_MODE === 'swoole') {
            $GLOBALS['__$response']->header($key, $value);
        } else {
            if (!headers_sent()) {
                header($key . ': '. $value);
            }
        }
    }
protected function setHeader ( $ key , $ value ) { if ( SERVER_MODE === 'swoole' ) { $ GLOBALS [ '__$response' ] -> header ( $ key , $ value ) ; } else { if ( ! headers_sent ( ) ) { header ( $ key . ': ' . $ value ) ; } } }
Set response header

@param string $key
@param string $value
@return void
Set response header