downloadFile

abstract suspend fun downloadFile(url: String, headers: Map<String, String>?, body: Any?, httpMethod: HttpMethod, targetFileName: String, mimeType: String?, onProgress: suspend (Float) -> Unit = {}, onDownloadFinished: suspend () -> Unit = {}, onDownloadFailure: suspend (Throwable) -> Unit = {}): Result<Unit>

Downloads a file into the device's public/general storage (system Downloads location). See dev.catbit.mosaic.core.data.schemas.event.events.networking.DownloadFileEventSchema for the full per-platform behavior contract.