UNPKG

ipull

Version:

The only file downloader you'll ever need. For node.js and the browser, CLI and library for fast and reliable file downloads.

20 lines (19 loc) 1.24 kB
import BaseDownloadEngineFetchStream, { DownloadInfoResponse, FetchSubState, WriteCallback } from "./base-download-engine-fetch-stream.js"; type GetNextChunk = () => Promise<ReadableStreamReadResult<Uint8Array>> | ReadableStreamReadResult<Uint8Array>; export default class DownloadEngineFetchStreamFetch extends BaseDownloadEngineFetchStream { private _fetchDownloadInfoWithHEAD; private _activeController?; transferAction: string; readonly supportDynamicStreamLength = true; withSubState(state: FetchSubState): this; protected fetchWithoutRetryChunks(callback: WriteCallback): Promise<void>; protected fetchDownloadInfoWithoutRetry(url: string): Promise<DownloadInfoResponse>; protected fetchDownloadInfoWithoutRetryByMethod(url: string, method?: "HEAD" | "GET"): Promise<DownloadInfoResponse>; protected fetchDownloadInfoWithoutRetryContentRange(url: string, response?: Response): Promise<number>; chunkGenerator(callback: WriteCallback, getNextChunk: GetNextChunk): Promise<void>; protected _wrapperStreamNotResponding<T>(promise: Promise<T> | T): Promise<T | void> | T | void; protected static convertHeadersToRecord(headers: Headers): { [key: string]: string; }; } export {};