---
title: "DownloadOptions"
sidebar_label: "DownloadOptions"
description: "Kotlin binding reference: DownloadOptions."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[DownloadOptions](index.md)

# DownloadOptions

[common]\
data class [DownloadOptions](index.md)(val bearerToken: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)? = null, val progress: [ProgressSink](../ProgressSink/index.md)? = null, val connectTimeoutSec: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 10, val readTimeoutSec: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 30, val followRedirects: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = true, val resume: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false)

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

## Constructors

| | |
|---|---|
| [DownloadOptions](DownloadOptions.md) | [common]<br>constructor(bearerToken: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)? = null, progress: [ProgressSink](../ProgressSink/index.md)? = null, connectTimeoutSec: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 10, readTimeoutSec: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 30, followRedirects: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = true, resume: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false) |

## Properties

| Name | Summary |
|---|---|
| [bearerToken](bearerToken.md) | [common]<br>val [bearerToken](bearerToken.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)? = null |
| [connectTimeoutSec](connectTimeoutSec.md) | [common]<br>val [connectTimeoutSec](connectTimeoutSec.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 10 |
| [followRedirects](followRedirects.md) | [common]<br>val [followRedirects](followRedirects.md): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = true |
| [progress](progress.md) | [common]<br>val [progress](progress.md): [ProgressSink](../ProgressSink/index.md)? = null |
| [readTimeoutSec](readTimeoutSec.md) | [common]<br>val [readTimeoutSec](readTimeoutSec.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 30 |
| [resume](resume.md) | [common]<br>val [resume](resume.md): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false |