Package-level declarations

Types

Link copied to clipboard
fun interface BytesReceiver
Link copied to clipboard
abstract class Downloader(indexFile: IndexFile, outputFile: File)
DownloadRequest
Link copied to clipboard
data class DownloadRequest @JvmOverloads constructor(val indexFile: IndexFile, val mirrors: List<Mirror>, val proxy: ProxyConfig? = null, val username: String? = null, val password: String? = null, val tryFirstMirror: Mirror? = null)
data class DownloadRequest constructor(val indexFile: IndexFile, val mirrors: List<Mirror>, val proxy: ProxyConfig? = null, val username: String? = null, val password: String? = null, val tryFirstMirror: Mirror? = null)
HeadInfo
Link copied to clipboard
data class HeadInfo(val eTagChanged: Boolean, val eTag: String?, val contentLength: Long?, val lastModified: String?)
data class HeadInfo(val eTagChanged: Boolean, val eTag: String?, val contentLength: Long?, val lastModified: String?)
Link copied to clipboard
class HttpDownloader(httpManager: HttpManager, request: DownloadRequest, destFile: File) : Downloader

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

Link copied to clipboard
class HttpDownloaderV2(httpManager: HttpManager, request: DownloadRequest, destFile: File) : Downloader

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

HttpManager
Link copied to clipboard
open class HttpManager @JvmOverloads constructor(userAgent: String, queryString: String? = null, proxyConfig: ProxyConfig? = null, mirrorChooser: MirrorChooser = MirrorChooserRandom(), httpClientEngineFactory: HttpClientEngineFactory<*> = getHttpClientEngineFactory())
open class HttpManager constructor(userAgent: String, queryString: String? = null, proxyConfig: ProxyConfig? = null, mirrorChooser: MirrorChooser = MirrorChooserRandom(), httpClientEngineFactory: HttpClientEngineFactory<*> = getHttpClientEngineFactory())
Link copied to clipboard
class HttpPoster(httpManager: HttpManager, url: String)

HTTP POST a JSON string to the URL configured in the constructor.

Mirror
Link copied to clipboard
data class Mirror @JvmOverloads constructor(val baseUrl: String, val location: String? = null, val isIpfsGateway: Boolean = false)
data class Mirror constructor(val baseUrl: String, val location: String? = null, val isIpfsGateway: Boolean = false)
MirrorChooser
Link copied to clipboard
interface MirrorChooser
interface MirrorChooser
NoResumeException
Link copied to clipboard

Thrown if we tried to resume a download, but the current mirror server does not offer resuming.

Thrown if we tried to resume a download, but the current mirror server does not offer resuming.

NotFoundException
Link copied to clipboard

Thrown when a file was not found. Catching this is useful when checking if a new index version exists and then falling back to an older version.

Thrown when a file was not found. Catching this is useful when checking if a new index version exists and then falling back to an older version.