HttpProgressEvent

Base interface for progress events.

查看"说明"...

      
      interface HttpProgressEvent {
  type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress
  loaded: number
  total?: number
}
    

说明

进度事件的基础接口。

属性

属性说明
type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress

进度事件的类型或者是上传或者是下载。

Progress event type is either upload or download.

loaded: number

已经上传或下载的字节数。

Number of bytes uploaded or downloaded.

total?: number

要上传或下载的总字节数。它可能是无法计算出来的,因此也就可能不存在,取决于是请求还是响应。

Total number of bytes to upload or download. Depending on the request or response, this may not be computable and thus may not be present.