HttpDownloaderV2

class HttpDownloaderV2(httpManager: HttpManager, request: DownloadRequest, destFile: File) : Downloader

Download files over HTTP, with support for proxies, .onion addresses, HTTP Basic Auth, etc.

Constructors

Link copied to clipboard
constructor(httpManager: HttpManager, request: DownloadRequest, destFile: File)

Properties

Link copied to clipboard

If you ask for the cacheTag before calling download(), you will get the same one you passed in (if any). If you call it after download(), you will get the new cacheTag from the server, or null if there was none.

Functions

Link copied to clipboard

Cancel a running download, triggering an InterruptedException

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun download()

Call this to start the download. Never call this more than once. Create a new Downloader, if you need to download again!

Link copied to clipboard
open override fun hasChanged(): Boolean

After calling download, this returns true if a new file was downloaded and false if the file on the server has not changed and thus was not downloaded.

Link copied to clipboard