RequestOperation
public class RequestOperation<R: Requestable>: AOperation<R>
An NSOperation that executes the Requestable
asynchronously.
-
Intializes an request operation.
Declaration
Swift
public init(requestable: R, request: @escaping () -> DataRequest, completionHandler: ((DataResponse<R.Response>) -> Void)?)
Parameters
requestable
The
Requestable
.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() -> AOperation<R>