Protocols
The following protocols are available globally.
-
A type which can serialize incoming
See moreData
.Declaration
Swift
public protocol DataStreamSerializer : Sendable
-
A type that can encode any
See moreEncodable
type into aURLRequest
.Declaration
Swift
public protocol ParameterEncoder : Sendable
-
A type used to define how a set of parameters are applied to a
See moreURLRequest
.Declaration
Swift
public protocol ParameterEncoding : Sendable
-
Protocol abstraction for
See moreRequest
‘s communication back to theSessionDelegate
.Declaration
Swift
public protocol RequestDelegate : AnyObject, Sendable
-
Types adopting the
See moreURLConvertible
protocol can be used to constructURL
s, which can then be used to constructURLRequest
s.Declaration
Swift
public protocol URLConvertible : Sendable
-
Types adopting the
See moreURLRequestConvertible
protocol can be used to safely constructURLRequest
s.Declaration
Swift
public protocol URLRequestConvertible : Sendable
-
A type that can produce an
See moreUploadRequest.Uploadable
value.Declaration
Swift
public protocol UploadableConvertible : Sendable
-
A type that can be converted to an upload, whether from an
UploadRequest.Uploadable
orURLRequestConvertible
.Declaration
Swift
public protocol UploadConvertible : URLRequestConvertible, UploadableConvertible
-
Undocumented
See moreDeclaration
Swift
public protocol WebSocketMessageSerializer<Output, Failure> : Sendable
-
Protocol describing the
See moreaf
extension points for Alamofire extended types.Declaration
Swift
public protocol AlamofireExtended
-
Types adopting the
AuthenticationCredential
protocol can be used to authenticateURLRequest
s.One common example of an
See moreAuthenticationCredential
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.Declaration
Swift
public protocol AuthenticationCredential
-
Types adopting the
See moreAuthenticator
protocol can be used to authenticateURLRequest
s with anAuthenticationCredential
as well as refresh theAuthenticationCredential
when required.Declaration
Swift
public protocol Authenticator : AnyObject, Sendable
-
A type that handles whether the data task should store the HTTP response in the cache.
See moreDeclaration
Swift
public protocol CachedResponseHandler : Sendable
-
A type that handles how an HTTP redirect response from a remote server should be redirected to the new request.
See moreDeclaration
Swift
public protocol RedirectHandler : Sendable
-
Type that provides both
See moreRequestAdapter
andRequestRetrier
functionality.Declaration
Swift
public protocol RequestInterceptor : RequestAdapter, RequestRetrier
-
A type that can inspect and optionally adapt a
See moreURLRequest
in some manner if necessary.Declaration
Swift
public protocol RequestAdapter : Sendable
-
A type that determines whether a request should be retried after being executed by the specified session manager and encountering an error.
See moreDeclaration
Swift
public protocol RequestRetrier : Sendable
-
The type to which all data response serializers must conform in order to serialize a response.
See moreDeclaration
Swift
public protocol DataResponseSerializerProtocol<SerializedObject> : Sendable
-
The type to which all download response serializers must conform in order to serialize a response.
See moreDeclaration
Swift
public protocol DownloadResponseSerializerProtocol<SerializedObject> : Sendable
-
A serializer that can handle both data and download responses.
See moreDeclaration
Swift
public protocol ResponseSerializer<SerializedObject> : DataResponseSerializerProtocol, DownloadResponseSerializerProtocol
-
Type used to preprocess
See moreData
before it handled by a serializer.Declaration
Swift
public protocol DataPreprocessor : Sendable
-
Protocol representing an empty response. Use
See moreT.emptyValue()
to get an instance.Declaration
Swift
public protocol EmptyResponse : Sendable