@univerjsnetworkclassesFetchhttpimplementation

@univerjs/network v0.5.0-beta.1Docs


Class: FetchHTTPImplementation

An HTTP implementation using Fetch API. This implementation can both run in browser and Node.js.

It does not support streaming response yet (May 12, 2024).

Implements

Constructors

new FetchHTTPImplementation()

new FetchHTTPImplementation(): FetchHTTPImplementation

Returns

FetchHTTPImplementation

Methods

send()

send(request): Observable<HTTPEvent<any>>

Send a request. The result would be returned in an observable for possible stream response.

Parameters

ParameterTypeDescription
requestHTTPRequestthe request to be sent

Returns

Observable<HTTPEvent<any>>

Implementation of

IHTTPImplementation.send

Defined in

submodules/univer/packages/network/src/services/http/implementations/fetch.ts:35