Downloadable

public protocol Downloadable : ADownloadable, Configurable, DownloadResponseSerializable

Represents a Downloadable for Restofire.

protocol HTTPBinDownloadService: Downloadable {

    var path: String? = "bytes/\(4 * 1024 * 1024)"
    var destination: DownloadFileDestination?

    init(destination: @escaping DownloadFileDestination) {
        self.destination = destination
    }

}
  • request(_:didCompleteWithValue:) Default implementation

    Called when the Request succeeds.

    Default Implementation

    Does Nothing

    Declaration

    Swift

    func request(_ request: DownloadOperation<Self>, didCompleteWithValue value: Response)

    Parameters

    request

    The Alamofire.DownloadRequest

    value

    The Response

  • request(_:didFailWithError:) Default implementation

    Called when the Request fails

    Default Implementation

    Does Nothing

    Declaration

    Swift

    func request(_ request: DownloadOperation<Self>, didFailWithError error: Error)

    Parameters

    request

    The Alamofire.DownloadRequest

    error

    The Error