API Reference
@univerjs
@univerjs/network
classes
Httpprogress

@univerjs/network v0.1.17Docs


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

packages/network/src/services/http/response.ts:66 (opens in a new tab)

Properties

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

Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.