DownloadTask
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public struct DownloadTask<Value> : Sendable where Value : Sendable
Value used to await a DownloadResponse and associated values.
-
responseAsynchronousDownloadResponseproduced by theDownloadRequestand its response handler.Declaration
Swift
public var response: DownloadResponse<Value, AFError> { get async } -
resultAsynchronous -
valueAsynchronousValuereturned by theresponse.Declaration
Swift
public var value: Value { get async throws } -
Cancel the underlying
DownloadRequestandTask.Declaration
Swift
public func cancel() -
Resume the underlying
DownloadRequest.Declaration
Swift
public func resume() -
Suspend the underlying
DownloadRequest.Declaration
Swift
public func suspend()
View on GitHub
Install in Dash