URLSessionBasedNetworkOperation
public class URLSessionBasedNetworkOperation<T>
extension URLSessionBasedNetworkOperation: NetworkOperation
extension URLSessionBasedNetworkOperation: URLSessionObserver
Base class for network operations backed by URLSessionTask
. Conforms to NetworkOperation
. Forwards URLSessionObserver
callbacks to blocks.
-
Declaration
Swift
public var id: Int { get }
-
Declaration
Swift
public var state: NetworkOperationState { get }
-
Declaration
Swift
public var isCancelled: Bool { get }
-
Declaration
Swift
public func start()
-
Declaration
Swift
public func cancel()
-
Undocumented
Declaration
Swift
public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64)
-
Undocumented
Declaration
Swift
public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?)
-
Undocumented
Declaration
Swift
public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data)
-
Undocumented
Declaration
Swift
public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL)
-
Undocumented
Declaration
Swift
public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64)