ADataUploadable

public protocol ADataUploadable : _AUploadable

Represents a DataUploadable for Alamofire.

Create custom DataUploadable

protocol HTTPBinUploadService: ADataUploadable {

    var path: String? = "post"
    var data: Data = {
        return "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
           .data(using: .utf8, allowLossyConversion: false)!
    }()

}
  • The data.

    Declaration

    Swift

    var data: Data { get }
  • request Extension method

    Creates a UploadRequest 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: UploadRequest { get }

    Return Value

    The created UploadRequest.