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
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() -> NetworkOperation<R>