cancel(_:)
Cancels the download, and optionally captures data so that you can resume the download later.
Declaration
func cancel(_ completionHandler: (@MainActor @Sendable (Data?) -> Void)? = nil)func cancel() async -> Data?Parameters
- completionHandler:
A closure you provide to capture and store data so that you can resume the download later.