Protocols
The following protocols are available globally.
-
A type used to define how a set of array parameters are applied to a
See moreURLRequest.Declaration
Swift
public protocol ArrayParameterEncoding -
Represents an abstract
BaseRequestable.Instead implement Requestable, Downloadable, FileUploadable, DataUploadable, StreamUploadable, MultipartUplodable protocols.
See moreDeclaration
Swift
public protocol BaseRequestable : Configurable, ResponseSerializable -
Represents a
Configurablefor Alamofire Services.Configuration.defaultby default.Create custom Configurable
See moreprotocol HTTPBinConfigurable: Configurable { } extension HTTPBinConfigurable { var configuration: Configuration { var config = Configuration() config.host = "httpbin.org" return config } }Declaration
Swift
public protocol Configurable : Authenticable, Pollable, Qosable, QueuePriortizable, Queueable, Reachable, RequestDelegate, Retryable, SessionManagable, Validatable -
Represents an
See moreAuthenticablethat is associated withRequestable.Declaration
Swift
public protocol Authenticable -
Protocol to define the opaque type returned from a request.
See moreDeclaration
Swift
public protocol Cancellable -
Represents a
See morePollablethat is associated withRequestable.Declaration
Swift
public protocol Pollable -
Represents an
See moreQosablethat is associated withRequestable.Declaration
Swift
public protocol Qosable -
Represents an
See moreUserInteractiveQosablethat is associated withRequestable.Declaration
Swift
public protocol UserInteractiveQosable : Qosable -
Represents an
See moreUserInitiatedQosablethat is associated withRequestable.Declaration
Swift
public protocol UserInitiatedQosable : Qosable -
Represents an
See moreDefaultQosablethat is associated withRequestable.Declaration
Swift
public protocol DefaultQosable : Qosable -
Represents an
See moreUtilityQosablethat is associated withRequestable.Declaration
Swift
public protocol UtilityQosable : Qosable -
Represents an
See moreBackgroundQosablethat is associated withRequestable.Declaration
Swift
public protocol BackgroundQosable : Qosable -
Represents an
See moreQueuePriortizablethat is associated withRequestable.Declaration
Swift
public protocol QueuePriortizable -
Represents an
See moreVeryHighQueuePriortizablethat is associated withRequestable.Declaration
Swift
public protocol VeryHighQueuePriortizable : QueuePriortizable -
Represents an
See moreHighQueuePriortizablethat is associated withRequestable.Declaration
Swift
public protocol HighQueuePriortizable : QueuePriortizable -
Represents an
See moreNormalQueuePriortizablethat is associated withRequestable.Declaration
Swift
public protocol NormalQueuePriortizable : QueuePriortizable -
Represents an
See moreLowQueuePriortizablethat is associated withRequestable.Declaration
Swift
public protocol LowQueuePriortizable : QueuePriortizable -
Represents an
See moreVeryLowQueuePriortizablethat is associated withRequestable.Declaration
Swift
public protocol VeryLowQueuePriortizable : QueuePriortizable -
Represents a
See moreQueueablethat is associated withRequestable.Declaration
Swift
public protocol Queueable -
Represents a
See moreReachabilitythat is associated withRequestable.Declaration
Swift
public protocol Reachable -
Represents a
See moreRequestDelegatethat is associated withRequestable.Declaration
Swift
public protocol RequestDelegate -
Represents a
See moreAlamofire.DataResponseSerializerthat is associated withRequestable.Declaration
Swift
public protocol ResponseSerializable -
Represents a
See moreRetrythat is associated withRequestable.Declaration
Swift
public protocol Retryable -
Represents a
See moreAlamofire.Sessionthat is associated withRequestable.Declaration
Swift
public protocol SessionManagable -
Undocumented
See moreDeclaration
Swift
public protocol Syncable -
Represents a
See moreValidationthat is associated withRequestable.Declaration
Swift
public protocol Validatable -
Represents a
DataUploadablefor Alamofire.Create custom DataUploadable
See moreprotocol HTTPBinUploadService: DataUploadable { typealias Response = Data var path: String? = "post" var data: Data = { return "Lorem ipsum dolor sit amet, consectetur adipiscing elit." .data(using: .utf8, allowLossyConversion: false)! }() }Declaration
Swift
public protocol DataUploadable : Uploadable -
Represents a
Downloadablefor Restofire.
See moreprotocol HTTPBinDownloadService: Downloadable { typealias Response = Data var path: String? = "bytes/\(4 * 1024 * 1024)" var destination: DownloadFileDestination? init(destination: @escaping DownloadFileDestination) { self.destination = destination } }Declaration
Swift
public protocol Downloadable : BaseRequestable -
Represents a
FileUploadablefor Alamofire.Create custom FileUploadable
See moreprotocol HTTPBinUploadService: FileUploadable { typealias Response = Data var path: String? = "post" let url: URL = FileManager.url(forResource: "rainbow", withExtension: "png") }Declaration
Swift
public protocol FileUploadable : Uploadable -
Represents a
MultipartUploadablefor Alamofire.Create custom MultipartUploadable
See moreprotocol HTTPBinUploadService: MultipartUploadable { typealias Response = Data var path: String? = "post" var multipartFormData: (MultipartFormData) -> Void = { multipartFormData in multipartFormData.append("français".data(using: .utf8)!, withName: "french") multipartFormData.append("日本語".data(using: .utf8)!, withName: "japanese") } }Declaration
Swift
public protocol MultipartUploadable : Uploadable -
Represents a
Requestablefor Restofire.Create custom Requestable
See moreprotocol HTTPBinGETService: Requestable { typealias Response = Data var path: String? = "get" }Declaration
Swift
public protocol Requestable : BaseRequestable -
Represents a
StreamUploadablefor Alamofire.Create custom StreamUploadable
See moreprotocol HTTPBinUploadService: StreamUploadable { typealias Response = Data var path: String? = "post" var stream: InputStream = InputStream(url: FileManager.imageURL)! }Declaration
Swift
public protocol StreamUploadable : Uploadable -
Represents an abstract
Uploadable.Instead implement FileUploadable, DataUploadable, StreamUploadable, AMultipartUplodable protocols.
See moreDeclaration
Swift
public protocol Uploadable : BaseRequestable
Protocols Reference