docs/Protocols.html
The following protocols are available globally.
`
DataStreamSerializer
`
A type which can serialize incoming Data.
Swift
public protocol DataStreamSerializer : Sendable
`
ParameterEncoder
`
A type that can encode any Encodable type into a URLRequest.
Swift
public protocol ParameterEncoder : Sendable
`
ParameterEncoding
`
A type used to define how a set of parameters are applied to a URLRequest.
Swift
public protocol ParameterEncoding : Sendable
`
RequestDelegate
`
Protocol abstraction for Request‘s communication back to the SessionDelegate.
Swift
public protocol RequestDelegate : AnyObject, Sendable
`
URLConvertible
`
Types adopting the URLConvertible protocol can be used to construct URLs, which can then be used to construct URLRequests.
Swift
public protocol URLConvertible : Sendable
`
URLRequestConvertible
`
Types adopting the URLRequestConvertible protocol can be used to safely construct URLRequests.
Swift
public protocol URLRequestConvertible : Sendable
`
UploadableConvertible
`
A type that can produce an UploadRequest.Uploadable value.
Swift
public protocol UploadableConvertible : Sendable
`
UploadConvertible
`
A type that can be converted to an upload, whether from an UploadRequest.Uploadable or URLRequestConvertible.
Swift
public protocol UploadConvertible : URLRequestConvertible, UploadableConvertible
`
WebSocketMessageSerializer
`
Undocumented
Swift
public protocol WebSocketMessageSerializer<Output, Failure> : Sendable
`
AlamofireExtended
`
Protocol describing the af extension points for Alamofire extended types.
Swift
public protocol AlamofireExtended
`
AuthenticationCredential
`
Types adopting the AuthenticationCredential protocol can be used to authenticate URLRequests.
One common example of an AuthenticationCredential is an OAuth2 credential containing an access token used to authenticate all requests on behalf of a user. The access token generally has an expiration window of 60 minutes which will then require a refresh of the credential using the refresh token to generate a new access token.
Swift
public protocol AuthenticationCredential
`
Authenticator
`
Types adopting the Authenticator protocol can be used to authenticate URLRequests with an AuthenticationCredential as well as refresh the AuthenticationCredential when required.
Swift
public protocol Authenticator : AnyObject, Sendable
`
CachedResponseHandler
`
A type that handles whether the data task should store the HTTP response in the cache.
Swift
public protocol CachedResponseHandler : Sendable
`
EventMonitor
`
Protocol outlining the lifetime events inside Alamofire. It includes both events received from the various URLSession delegate protocols as well as various events from the lifetime of Request and its subclasses.
Swift
public protocol EventMonitor : Sendable
`
RequestInterceptor
`
Type that provides both RequestAdapter and RequestRetrier functionality.
Swift
public protocol RequestInterceptor : RequestAdapter, RequestRetrier
`
RedirectHandler
`
A type that handles how an HTTP redirect response from a remote server should be redirected to the new request.
Swift
public protocol RedirectHandler : Sendable
`
RequestAdapter
`
A type that can inspect and optionally adapt a URLRequest in some manner if necessary.
Swift
public protocol RequestAdapter : Sendable
`
RequestRetrier
`
A type that determines whether a request should be retried after being executed by the specified session manager and encountering an error.
Swift
public protocol RequestRetrier : Sendable
`
DataResponseSerializerProtocol
`
The type to which all data response serializers must conform in order to serialize a response.
Swift
public protocol DataResponseSerializerProtocol<SerializedObject> : Sendable
`
DownloadResponseSerializerProtocol
`
The type to which all download response serializers must conform in order to serialize a response.
Swift
public protocol DownloadResponseSerializerProtocol<SerializedObject> : Sendable
`
ResponseSerializer
`
A serializer that can handle both data and download responses.
Swift
public protocol ResponseSerializer<SerializedObject> : DataResponseSerializerProtocol, DownloadResponseSerializerProtocol
`
DataPreprocessor
`
Type used to preprocess Data before it handled by a serializer.
Swift
public protocol DataPreprocessor : Sendable
`
EmptyResponse
`
Protocol representing an empty response. Use T.emptyValue() to get an instance.
Swift
public protocol EmptyResponse : Sendable
`
DataDecoder
`
Any type which can decode Data into a Decodable type.
Swift
public protocol DataDecoder : Sendable
`
ServerTrustEvaluating
`
A protocol describing the API used to evaluate server trusts.
Swift
public protocol ServerTrustEvaluating : Sendable