DownloadOperation
public class DownloadOperation<R> : NetworkOperation<R> where R : Downloadable
An NSOperation that executes the Downloadable asynchronously.
-
Intializes an download operation.
Declaration
Swift
public init( downloadable: R, request: @escaping (() -> DownloadRequest), downloadProgressHandler: ((Progress) -> Void, queue: DispatchQueue?)? = nil, completionQueue: DispatchQueue, completionHandler: ((DownloadResponse<R.Response>) -> Void)? )Parameters
downloadableThe
Downloadable.requestThe request closure.
completionHandlerThe async completion handler called when the request is completed
-
Creates a copy of self
Declaration
Swift
open override func copy() -> NetworkOperation<R>
DownloadOperation Class Reference