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