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


Class: HTTPProgress

Progress event for HTTP request. Usually used for reporting download/upload progress or SSE streaming.

Implements

  • IHTTPEvent

Constructors

new HTTPProgress()

new HTTPProgress(
   total, 
   loaded, 
   partialText?): HTTPProgress

Parameters

ParameterTypeDescription
totalundefined | numberTotal number of bytes to download. Depending on the request or response, this may not be computable and thus may not be present.
loadednumberNumber of bytes downloaded.
partialText?stringThe partial response body as downloaded so far. Only present if the responseType was text.

Returns

HTTPProgress

Defined in

submodules/univer/packages/network/src/services/http/response.ts:66

Properties

PropertyModifierTypeDefault valueDescriptionDefined in
loadedreadonlynumberundefinedNumber of bytes downloaded.submodules/univer/packages/network/src/services/http/response.ts:76
partialText?readonlystringundefinedThe partial response body as downloaded so far. Only present if the responseType was text.submodules/univer/packages/network/src/services/http/response.ts:82
totalreadonlyundefined | numberundefinedTotal number of bytes to download. Depending on the request or response, this may not be computable and thus may not be present.submodules/univer/packages/network/src/services/http/response.ts:71
typereadonlyDownloadProgressHTTPEventType.DownloadProgress-submodules/univer/packages/network/src/services/http/response.ts:64