@univerjsnetworkindexclassesFetchhttpimplementation

@univerjs/network v0.5.4


Class: FetchHTTPImplementation

Defined in: submodules/univer/packages/network/src/services/http/implementations/fetch.ts:36

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(_logService): FetchHTTPImplementation

Defined in: submodules/univer/packages/network/src/services/http/implementations/fetch.ts:37

Parameters

ParameterType
_logServiceILogService

Returns

FetchHTTPImplementation

Methods

send()

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

Defined in: submodules/univer/packages/network/src/services/http/implementations/fetch.ts:41

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