DownloadFileToMemoryUseCase
class DownloadFileToMemoryUseCase(repository: MosaicRepository) : UseCase<Unit, DownloadFileToMemoryUseCase.Params>
Downloads a file entirely into memory, never touching the filesystem — backs DownloadFileToMemory. Reachable via get<DownloadFileToMemoryUseCase>().
Types
Link copied to clipboard
data class Params(val url: String, val headers: Map<String, String>?, val timeouts: TimeoutsSchema? = null, val body: Any?, val httpMethod: HttpMethod, val onProgress: suspend (Float) -> Unit = {}, val onDownloadFinished: suspend (ByteArray) -> Unit = {}, val onDownloadFailure: suspend (Throwable) -> Unit = {})