UploadOperation
public class UploadOperation<R> : NetworkOperation<R> where R : Uploadable
An NSOperation that executes the Uploadable
asynchronously.
-
Intializes an upload operation.
Declaration
Swift
public init( uploadable: R, request: @escaping () -> UploadRequest, uploadProgressHandler: ((Progress) -> Void, queue: DispatchQueue?)? = nil, completionQueue: DispatchQueue, completionHandler: ((DataResponse<R.Response>) -> Void)? )
Parameters
uploadable
The
Uploadable
.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>