ADownloadable

public protocol ADownloadable: _Requestable, AConfigurable

Represents a Downloadable for Alamofire.

Create custom Downloadable

protocol HTTPBinDownloadService: ADownloadable {

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

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

}
  • destination Default implementation

    The download file destination

    Default Implementation

    nil

    Declaration

    Swift

    var destination: DownloadFileDestination?
  • validationBlock Default implementation

    The Alamofire data request validation.

    Default Implementation

    Validation.default.downloadValidation

    Declaration

    Swift

    var validationBlock: DownloadRequest.Validation?
  • request Extension method

    Creates a DownloadRequest to retrieve the contents of a URL based on the specified Requestable

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    Declaration

    Swift

    public var request: DownloadRequest

    Return Value

    The created DownloadRequest.