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.
-
response
AsynchronousDownloadResponse
produced by theDownloadRequest
and its response handler.Declaration
Swift
public var response: DownloadResponse<Value, AFError> { get async }
-
result
Asynchronous -
value
AsynchronousValue
returned by theresponse
.Declaration
Swift
public var value: Value { get async throws }
-
Cancel the underlying
DownloadRequest
andTask
.Declaration
Swift
public func cancel()
-
Resume the underlying
DownloadRequest
.Declaration
Swift
public func resume()
-
Suspend the underlying
DownloadRequest
.Declaration
Swift
public func suspend()