UploadOperation

public class UploadOperation<R> : AOperation<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)? = nil,
        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() -> AOperation<R>