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 a
AConfigurable
for Alamofire Services.Configuration.default
by default.Create custom AConfigurable
See moreprotocol HTTPBinConfigurable: AConfigurable { } extension HTTPBinConfigurable { var configuration: Configuration { var config = Configuration() config.host = "httpbin.org" return config } }
Declaration
Swift
public protocol AConfigurable : Authenticable, RequestDelegate, SessionManagable, Validatable, _Configurable
-
Represents a
DataUploadable
for Alamofire.Create custom DataUploadable
See moreprotocol HTTPBinUploadService: ADataUploadable { 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 ADataUploadable : _AUploadable
-
Represents a
Downloadable
for Alamofire.Create custom Downloadable
See moreprotocol HTTPBinDownloadService: ADownloadable { var path: String? = "bytes/\(4 * 1024 * 1024)" var destination: DownloadFileDestination? init(destination: @escaping DownloadFileDestination) { self.destination = destination } }
Declaration
Swift
public protocol ADownloadable : AConfigurable, _Requestable
-
Represents a
FileUploadable
for Alamofire.Create custom FileUploadable
See moreprotocol HTTPBinUploadService: AFileUploadable { var path: String? = "post" let url: URL = FileManager.url(forResource: "rainbow", withExtension: "jpg") }
Declaration
Swift
public protocol AFileUploadable : _AUploadable
-
Represents a
MultipartUploadable
for Alamofire.Create custom MultipartUploadable
See moreprotocol HTTPBinUploadService: AMultipartUploadable { 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 AMultipartUploadable : _AUploadable
-
Represents a
Requestable
for Alamofire.Create custom Requestable
See moreprotocol HTTPBinGETService: ARequestable { var path: String? = "get" }
Declaration
Swift
public protocol ARequestable : AConfigurable, _Requestable
-
Represents a
StreamUploadable
for Alamofire.Create custom StreamUploadable
See moreprotocol HTTPBinUploadService: AStreamUploadable { var path: String? = "post" var stream: InputStream = InputStream(url: FileManager.imageURL)! }
Declaration
Swift
public protocol AStreamUploadable : _AUploadable
-
Represents an abstract
Uploadable
for Alamofire.Instead implement AFileUploadable, ADataUploadable, AStreamUploadable, AMultipartUplodable protocols.
See moreDeclaration
Swift
public protocol _AUploadable : ARequestable
-
Represents a
Configurable
for URLSession.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
-
Represents a
Requestable
for URLSession.Create custom Requestable
See moreprotocol HTTPBinGETService: _Requestable { var path: String? = "get" }
Declaration
Swift
public protocol _Requestable : _Configurable
-
Represents an
See moreAuthenticable
that is associated withRequestable
.Declaration
Swift
public protocol Authenticable
-
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
-
Undocumented
See moreDeclaration
Swift
public protocol _ResponseSerializable
-
Represents a
See moreAlamofire.DataResponseSerializer
that is associated withRequestable
.Declaration
Swift
public protocol DataResponseSerializable : _ResponseSerializable
-
Represents a
See moreAlamofire.DownloadResponseSerializer
that is associated withDownloadable
.Declaration
Swift
public protocol DownloadResponseSerializable : _ResponseSerializable
-
Represents a
See moreRetry
that is associated withRequestable
.Declaration
Swift
public protocol Retryable
-
Represents a
See moreAlamofire.SessionManager
that is associated withRequestable
.Declaration
Swift
public protocol SessionManagable
-
Represents a
See moreValidation
that is associated withRequestable
.Declaration
Swift
public protocol Validatable
-
Represents a
Configurable
for Restofire.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 : AConfigurable, Queueable, Reachable, Retryable
-
Represents a
DataUploadable
for Restofire.Create custom DataUploadable
protocol HTTPBinUploadService: DataUploadable { 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 : ADataUploadable, Uploadable
-
Represents a
Downloadable
for Restofire.
See moreprotocol HTTPBinDownloadService: Downloadable { var path: String? = "bytes/\(4 * 1024 * 1024)" var destination: DownloadFileDestination? init(destination: @escaping DownloadFileDestination) { self.destination = destination } }
Declaration
Swift
public protocol Downloadable : ADownloadable, Configurable, DownloadResponseSerializable
-
Represents a
FileUploadable
for Restofire.Create custom FileUploadable
protocol HTTPBinUploadService: FileUploadable { var path: String? = "post" let url: URL = FileManager.url(forResource: "rainbow", withExtension: "jpg") }
Declaration
Swift
public protocol FileUploadable : AFileUploadable, Uploadable
-
Represents a
MultipartUploadable
for Restofire.Create custom MultipartUploadable
protocol HTTPBinUploadService: MultipartUploadable { 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 : AMultipartUploadable, Uploadable
-
Represents a
Requestable
for Restofire.Create custom Requestable
See moreprotocol HTTPBinGETService: Requestable { var path: String? = "get" }
Declaration
Swift
public protocol Requestable : ARequestable, Configurable, DataResponseSerializable
-
Represents a
StreamUploadable
for Restofire.Create custom StreamUploadable
protocol HTTPBinUploadService: StreamUploadable { var path: String? = "post" var stream: InputStream = InputStream(url: FileManager.imageURL)! }
Declaration
Swift
public protocol StreamUploadable : AStreamUploadable, Uploadable
-
Represents an abstract
Uploadable
for Restofire.Instead implement FileUploadable, DataUploadable, StreamUploadable, MultipartUplodable protocols.
See moreDeclaration
Swift
public protocol Uploadable : Configurable, DataResponseSerializable, _AUploadable