DownloadOperation

public class DownloadOperation<R: Downloadable>: AOperation<R>

An NSOperation that executes the Downloadable asynchronously.

  • Intializes an download operation.

    Declaration

    Swift

    public init(downloadable: R, request: @escaping (() -> DownloadRequest), completionHandler: ((DownloadResponse<R.Response>) -> Void)?)

    Parameters

    downloadable
    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>