RequestOperation
public class RequestOperation<R> : NetworkOperation<R> where R : Requestable
An NSOperation that executes the Requestable asynchronously.
-
Intializes an request operation.
Declaration
Swift
public init( requestable: R, request: @escaping () -> DataRequest, downloadProgressHandler: ((Progress) -> Void, queue: DispatchQueue?)? = nil, completionQueue: DispatchQueue, completionHandler: ((DataResponse<R.Response>) -> Void)? )Parameters
requestableThe
Requestable.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>
RequestOperation Class Reference