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
downloadable
The
Downloadable
.request
The request closure.
completionHandler
The async completion handler called when the request is completed
-
Creates a copy of self
Declaration
Swift
open override func copy() -> NetworkOperation<R>