docs/Structs/DownloadTask.html
@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
` Asynchronous
DownloadResponse produced by the DownloadRequest and its response handler.
Swift
public var response: DownloadResponse<Value, AFError> { get async }
`
result
` Asynchronous
Result of any response serialization performed for the response.
Swift
public var result: Result<Value, AFError> { get async }
`
value
` Asynchronous
Value returned by the response.
Swift
public var value: Value { get async throws }
`
cancel()
`
Cancel the underlying DownloadRequest and Task.
Swift
public func cancel()
`
resume()
`
Resume the underlying DownloadRequest.
Swift
public func resume()
`
suspend()
`
Suspend the underlying DownloadRequest.
Swift
public func suspend()