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
Configurable
for Alamofire Services.Configuration.default
by 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 moreAuthenticable
that 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 morePollable
that is associated withRequestable
.Declaration
Swift
public protocol Pollable
-
Represents an
See moreQosable
that is associated withRequestable
.Declaration
Swift
public protocol Qosable
-
Represents an
See moreUserInteractiveQosable
that is associated withRequestable
.Declaration
Swift
public protocol UserInteractiveQosable : Qosable
-
Represents an
See moreUserInitiatedQosable
that is associated withRequestable
.Declaration
Swift
public protocol UserInitiatedQosable : Qosable
-
Represents an
See moreDefaultQosable
that is associated withRequestable
.Declaration
Swift
public protocol DefaultQosable : Qosable
-
Represents an
See moreUtilityQosable
that is associated withRequestable
.Declaration
Swift
public protocol UtilityQosable : Qosable
-
Represents an
See moreBackgroundQosable
that is associated withRequestable
.Declaration
Swift
public protocol BackgroundQosable : Qosable
-
Represents an
See moreQueuePriortizable
that is associated withRequestable
.Declaration
Swift
public protocol QueuePriortizable
-
Represents an
See moreVeryHighQueuePriortizable
that is associated withRequestable
.Declaration
Swift
public protocol VeryHighQueuePriortizable : QueuePriortizable
-
Represents an
See moreHighQueuePriortizable
that is associated withRequestable
.Declaration
Swift
public protocol HighQueuePriortizable : QueuePriortizable
-
Represents an
See moreNormalQueuePriortizable
that is associated withRequestable
.Declaration
Swift
public protocol NormalQueuePriortizable : QueuePriortizable
-
Represents an
See moreLowQueuePriortizable
that is associated withRequestable
.Declaration
Swift
public protocol LowQueuePriortizable : QueuePriortizable
-
Represents an
See moreVeryLowQueuePriortizable
that is associated withRequestable
.Declaration
Swift
public protocol VeryLowQueuePriortizable : QueuePriortizable
-
Represents a
See moreQueueable
that is associated withRequestable
.Declaration
Swift
public protocol Queueable
-
Represents a
See moreReachability
that is associated withRequestable
.Declaration
Swift
public protocol Reachable
-
Represents a
See moreRequestDelegate
that is associated withRequestable
.Declaration
Swift
public protocol RequestDelegate
-
Represents a
See moreAlamofire.DataResponseSerializer
that is associated withRequestable
.Declaration
Swift
public protocol ResponseSerializable
-
Represents a
See moreRetry
that is associated withRequestable
.Declaration
Swift
public protocol Retryable
-
Represents a
See moreAlamofire.Session
that is associated withRequestable
.Declaration
Swift
public protocol SessionManagable
-
Undocumented
See moreDeclaration
Swift
public protocol Syncable
-
Represents a
See moreValidation
that is associated withRequestable
.Declaration
Swift
public protocol Validatable
-
Represents a
DataUploadable
for 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
Downloadable
for 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
FileUploadable
for 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
MultipartUploadable
for 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
Requestable
for Restofire.Create custom Requestable
See moreprotocol HTTPBinGETService: Requestable { typealias Response = Data var path: String? = "get" }
Declaration
Swift
public protocol Requestable : BaseRequestable
-
Represents a
StreamUploadable
for 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