Skip to content

Class DownloadAgent

🏭 Constructors

constructor

ts
new DownloadAgent(retryHandler: RetryPolicy, rangePolicy: RangePolicy, dispatcher: Dispatcher, checkpointHandler: undefined | CheckpointHandler): DownloadAgent

Parameters

  • retryHandler: RetryPolicy
  • rangePolicy: RangePolicy
  • dispatcher: Dispatcher
  • checkpointHandler: undefined | CheckpointHandler

Return Type

  • DownloadAgent

Defined in: packages/file-transfer/agent.ts:33

🏷️ Properties

checkpointHandler

ts
checkpointHandler: undefined | CheckpointHandler

Defined in: packages/file-transfer/agent.ts:37

dispatcher

ts
dispatcher: Dispatcher

Defined in: packages/file-transfer/agent.ts:36

rangePolicy

ts
rangePolicy: RangePolicy

Defined in: packages/file-transfer/agent.ts:35

retryHandler

ts
retryHandler: RetryPolicy

Defined in: packages/file-transfer/agent.ts:34

🔧 Methods

dispatch

ts
dispatch(url: URL, method: string, headers: Record<string, string>, destination: string, handle: FileHandle, progressController: undefined | ProgressController, abortSignal: undefined | AbortSignal): Promise<void>

Parameters

  • url: URL
  • method: string
  • headers: Record<string, string>
  • destination: string
  • handle: FileHandle
  • progressController: undefined | ProgressController
  • abortSignal: undefined | AbortSignal

Return Type

  • Promise<void>

Defined in: packages/file-transfer/agent.ts:58

ts
head(url: URL, headers: Record<string, string>, signal: AbortSignal): Promise<ResponseData>

Parameters

  • url: URL
  • headers: Record<string, string>
  • signal: AbortSignal

Return Type

  • Promise<ResponseData>

Defined in: packages/file-transfer/agent.ts:42

Released under the MIT License.