Skip to main content

//clika-runtime/io.clika.runtime/DownloadOptions

DownloadOptions

[common]
data class DownloadOptions(val bearerToken: String? = null, val progress: ProgressSink? = null, val connectTimeoutSec: Int = 10, val readTimeoutSec: Int = 30, val followRedirects: Boolean = true, val resume: Boolean = false)

The options of a transfer: a bearer token for Authorization (never logged), a progress sink (return false to cancel), the connect and read budgets in seconds, whether 3xx redirects are followed, and, for Http.downloadFile alone, whether an existing partial destination is resumed with a ranged request and kept on failure.

Constructors​

DownloadOptions[common]
constructor(bearerToken: String? = null, progress: ProgressSink? = null, connectTimeoutSec: Int = 10, readTimeoutSec: Int = 30, followRedirects: Boolean = true, resume: Boolean = false)

Properties​

NameSummary
bearerToken[common]
val bearerToken: String? = null
connectTimeoutSec[common]
val connectTimeoutSec: Int = 10
followRedirects[common]
val followRedirects: Boolean = true
progress[common]
val progress: ProgressSink? = null
readTimeoutSec[common]
val readTimeoutSec: Int = 30
resume[common]
val resume: Boolean = false