@univerjs/network v0.4.2 • Docs
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
Parameter | Type | Description |
---|---|---|
total | undefined | number | Total number of bytes to download. Depending on the request or response, this may not be computable and thus may not be present. |
loaded | number | Number of bytes downloaded. |
partialText ? | string | The partial response body as downloaded so far. Only present if the responseType was text . |
Returns
Defined in
packages/network/src/services/http/response.ts:66 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Description | Defined in |
---|---|---|---|---|---|
loaded | readonly | number | undefined | Number of bytes downloaded. | packages/network/src/services/http/response.ts:76 (opens in a new tab) |
partialText? | readonly | string | undefined | The 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) |
total | readonly | undefined | number | undefined | Total 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) |
type | readonly | DownloadProgress | HTTPEventType.DownloadProgress | - | packages/network/src/services/http/response.ts:64 (opens in a new tab) |