• Downloads the specified url to a local file or returning the file content as DownloadData object.

    Parameters

    • url: string

      The remote url to download.

    • Optional auth: string

      The basic authentication (user:password).

    • Optional outputLocationPath: string

      The file output. If not specified, the download content will be returned as DownloadData instance.

    • Optional range: string

      The HTTP byte range to download (e.g. 10-100).

    • timeout: number = 60000

      The download timeout in milliseconds.

    Returns Promise<void | DownloadData>