HttpDownloader

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

Deprecated

Only for v1 repos

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()

Get a remote file, checking the HTTP response code, if it has changed since the last time a download was tried.

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