@univerjs/network

GitHubEdit on GitHub

Network service abstractions for Univer runtime integrations.

import { UniverNetworkPlugin } from '@univerjs/network'

univer.registerPlugin(UniverNetworkPlugin, IUniverNetworkConfig)

IUniverNetworkConfig

import type { DependencyOverride } from '@univerjs/core'

export interface IUniverNetworkConfig {
  /**
   * Use fetch instead of XMLHttpRequest. By default, Univer will use fetch on Node.js and XMLHttpRequest in browser.
   */
  useFetchImpl?: boolean

  /**
   * Build in dependencies that can be overridden:
   *
   * - {@link HTTPService}
   * - {@link IHTTPImplementation}
   */
  override?: DependencyOverride

  /**
   * Force to use a new instance of {@link HTTPService} and {@link IHTTPImplementation} even if
   * an ancestor injector already has them registered.
   */
  forceUseNewInstance?: boolean
}

Table of Contents

Capalyze