This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
forked from Alamofire/Alamofire
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
mattt edited this page Sep 18, 2020
·
9 revisions
-
AFError:
AFError
is the error type returned by Alamofire. It encompasses a few different types of errors, each with their own associated reasons. -
AFError.MultipartEncodingFailureReason:
The underlying reason the
.multipartEncodingFailed
error occurred. -
AFError.ParameterEncodingFailureReason:
The underlying reason the
.parameterEncodingFailed
error occurred. -
AFError.ParameterEncoderFailureReason:
The underlying reason the
.parameterEncoderFailed
error occurred. - AFError.ParameterEncoderFailureReason.RequiredComponent: Possible missing components.
-
AFError.ResponseValidationFailureReason:
The underlying reason the
.responseValidationFailed
error occurred. - AFError.ResponseSerializationFailureReason: The underlying reason the response serialization error occurred.
- AFError.ServerTrustFailureReason: Underlying reason a server trust evaluation error occurred.
- AFError.ServerTrustFailureReason.Output: The output of a server trust evaluation.
-
AFError.URLRequestValidationFailureReason:
The underlying reason the
.urlRequestValidationFailed
-
AF:
Global namespace containing API for the
default
Session
instance. -
AlamofireExtension:
Type that acts as a generic extension point for all
AlamofireExtended
types. -
ResponseCacher:
ResponseCacher
is a convenienceCachedResponseHandler
making it easy to cache, not cache, or modify a cached response. -
ResponseCacher.Behavior:
Defines the behavior of the
ResponseCacher
type. -
CompositeEventMonitor:
An
EventMonitor
which can contain multipleEventMonitor
s and calls their methods on their queues. -
ClosureEventMonitor:
EventMonitor
that allows optional closures to be set to receive events. - HTTPHeaders: An order-preserving and case-insensitive representation of HTTP headers.
- HTTPHeader: A representation of a single HTTP header's name / value pair.
-
HTTPMethod:
Type representing HTTP methods. Raw
String
value is stored and compared case-sensitively, soHTTPMethod.get != HTTPMethod(rawValue: "get")
. -
MultipartFormData:
Constructs
multipart/form-data
for uploads within an HTTP or HTTPS body. There are currently two ways to encode multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. -
NetworkReachabilityManager:
The
NetworkReachabilityManager
class listens for reachability changes of hosts and addresses for both cellular and WiFi network interfaces. - NetworkReachabilityManager.NetworkReachabilityStatus: Defines the various states of network reachability.
- NetworkReachabilityManager.NetworkReachabilityStatus.ConnectionType: Defines the various connection types detected by reachability flags.
-
AlamofireNotifications:
EventMonitor
that provides Alamofire's notifications. -
JSONParameterEncoder:
A
ParameterEncoder
that encodes types as JSON body data. -
URLEncodedFormParameterEncoder:
A
ParameterEncoder
that encodes types as URL-encoded query strings to be set on the URL or as body data, depending on theDestination
set. -
URLEncodedFormParameterEncoder.Destination:
Defines where the URL-encoded string should be set for each
URLRequest
. - URLEncoding: Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the destination of the encoding.
- URLEncoding.Destination: Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the resulting URL request.
-
URLEncoding.ArrayEncoding:
Configures how
Array
parameters are encoded. -
URLEncoding.BoolEncoding:
Configures how
Bool
parameters are encoded. -
JSONEncoding:
Uses
JSONSerialization
to create a JSON representation of the parameters object, which is set as the body of the request. TheContent-Type
HTTP header field of an encoded request is set toapplication/json
. -
Redirector:
Redirector
is a convenienceRedirectHandler
making it easy to follow, not follow, or modify a redirect. -
Redirector.Behavior:
Defines the behavior of the
Redirector
type. -
Request:
Request
is the common superclass of all Alamofire request types and provides common state, delegate, and callback handling. -
Request.State:
State of the
Request
, with managed transitions between states set when callingresume()
,suspend()
, orcancel()
on theRequest
. -
DataRequest:
Request
subclass which handles in-memoryData
download usingURLSessionDataTask
. -
DownloadRequest:
Request
subclass which downloadsData
to a file on disk usingURLSessionDownloadTask
. -
DownloadRequest.Options:
A set of options to be executed prior to moving a downloaded file from the temporary
URL
to the destinationURL
. -
DownloadRequest.Downloadable:
Type describing the source used to create the underlying
URLSessionDownloadTask
. -
UploadRequest:
DataRequest
subclass which handlesData
upload from memory, file, or stream usingURLSessionUploadTask
. -
UploadRequest.Uploadable:
Type describing the origin of the upload, whether
Data
, file, or stream. - RetryResult: Outcome of determination whether retry is necessary.
-
Adapter:
Closure-based
RequestAdapter
. -
Retrier:
Closure-based
RequestRetrier
. -
Interceptor:
RequestInterceptor
which can use multipleRequestAdapter
andRequestRetrier
values. -
DataResponse:
Type used to store all values associated with a serialized response of a
DataRequest
orUploadRequest
. - DownloadResponse: Used to store all data associated with a serialized response of a download request.
-
PassthroughPreprocessor:
DataPreprocessor
that returns passedData
without any transform. -
GoogleXSSIPreprocessor:
DataPreprocessor
that trims Google's typical)]}',\n
XSSI JSON header. -
DataResponseSerializer:
A
ResponseSerializer
that performs minimal response checking and returns any response data as-is. By default, a request returningnil
or no data is considered an error. However, if the response is has a status code valid for empty responses (204
,205
), then an emptyData
value is returned. -
StringResponseSerializer:
A
ResponseSerializer
that decodes the response data as aString
. By default, a request returningnil
or no data is considered an error. However, if the response is has a status code valid for empty responses (204
,205
), then an emptyString
is returned. -
JSONResponseSerializer:
A
ResponseSerializer
that decodes the response data usingJSONSerialization
. By default, a request returningnil
or no data is considered an error. However, if the response is has a status code valid for empty responses (204
,205
), then anNSNull
value is returned. -
Empty:
Type representing an empty response. Use
Empty.value
to get the static instance. -
DecodableResponseSerializer:
A
ResponseSerializer
that decodes the response data as a generic value using any type that conforms toDataDecoder
. By default, this is an instance ofJSONDecoder
. Additionally, a request returningnil
or no data is considered an error. However, if the response is has a status code valid for empty responses (204
,205
), then theEmpty.value
value is returned. - RetryPolicy: A retry policy that retries requests using an exponential backoff for allowed HTTP methods and HTTP status codes as well as certain types of networking errors.
- ConnectionLostRetryPolicy: A retry policy that automatically retries idempotent requests for network connection lost errors. For more information about retrying network connection lost errors, please refer to Apple's technical document.
-
ServerTrustManager:
Responsible for managing the mapping of
ServerTrustEvaluating
values to given hosts. - DefaultTrustEvaluator: An evaluator which uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. Applications are encouraged to always validate the host in production environments to guarantee the validity of the server's certificate chain.
- RevocationTrustEvaluator: An evaluator which Uses the default and revoked server trust evaluations allowing you to control whether to validate the host provided by the challenge as well as specify the revocation flags for testing for revoked certificates. Apple platforms did not start testing for revoked certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is demonstrated in our TLS tests. Applications are encouraged to always validate the host in production environments to guarantee the validity of the server's certificate chain.
- RevocationTrustEvaluator.Options: Represents the options to be use when evaluating the status of a certificate. Only Revocation Policy Constants are valid, and can be found in Apple's documentation.
- PinnedCertificatesTrustEvaluator: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. By validating both the certificate chain and host, certificate pinning provides a very secure form of server trust validation mitigating most, if not all, MITM attacks. Applications are encouraged to always validate the host and require a valid certificate chain in production environments.
- PublicKeysTrustEvaluator: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. By validating both the certificate chain and host, public key pinning provides a very secure form of server trust validation mitigating most, if not all, MITM attacks. Applications are encouraged to always validate the host and require a valid certificate chain in production environments.
- CompositeTrustEvaluator: Uses the provided evaluators to validate the server trust. The trust is only considered valid if all of the evaluators consider it valid.
- DisabledEvaluator: Disables all evaluation which in turn will always consider any server trust as valid.
-
Session:
Session
creates and manages Alamofire'sRequest
types during their lifetimes. It also provides common functionality for allRequest
s, including queuing, interception, trust management, redirect handling, and response cache handling. -
SessionDelegate:
Class which implements the various
URLSessionDelegate
methods to connect various Alamofire features. - URLEncodedFormEncoder: An object that encodes instances into URL-encoded query strings.
-
URLEncodedFormEncoder.ArrayEncoding:
Encoding to use for
Array
values. -
URLEncodedFormEncoder.BoolEncoding:
Encoding to use for
Bool
values. -
URLEncodedFormEncoder.DataEncoding:
Encoding to use for
Data
values. -
URLEncodedFormEncoder.DateEncoding:
Encoding to use for
Date
values. - URLEncodedFormEncoder.KeyEncoding: Encoding to use for keys.
- URLEncodedFormEncoder.SpaceEncoding: Encoding to use for spaces.
-
URLEncodedFormEncoder.Error:
URLEncodedFormEncoder
error.
-
AlamofireExtended:
Protocol describing the
af
extension points for Alamofire extended types. - CachedResponseHandler: A type that handles whether the data task should store the HTTP response in the cache.
-
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 ofRequest
and its subclasses. -
ParameterEncoder:
A type that can encode any
Encodable
type into aURLRequest
. -
ParameterEncoding:
A type used to define how a set of parameters are applied to a
URLRequest
. - RedirectHandler: A type that handles how an HTTP redirect response from a remote server should be redirected to the new request.
-
RequestDelegate:
Protocol abstraction for
Request
's communication back to theSessionDelegate
. -
UploadableConvertible:
A type that can produce an
UploadRequest.Uploadable
value. -
UploadConvertible:
A type that can be converted to an upload, whether from an
UploadRequest.Uploadable
orURLRequestConvertible
. -
RequestAdapter:
A type that can inspect and optionally adapt a
URLRequest
in some manner if necessary. - RequestRetrier: A type that determines whether a request should be retried after being executed by the specified session manager and encountering an error.
-
RequestInterceptor:
Type that provides both
RequestAdapter
andRequestRetrier
functionality. - DataResponseSerializerProtocol: The type to which all data response serializers must conform in order to serialize a response.
- DownloadResponseSerializerProtocol: The type to which all download response serializers must conform in order to serialize a response.
- ResponseSerializer: A serializer that can handle both data and download responses.
-
DataPreprocessor:
Type used to preprocess
Data
before it handled by a serializer. -
EmptyResponse:
Protocol representing an empty response. Use
T.emptyValue()
to get an instance. -
DataDecoder:
Any type which can decode
Data
into aDecodable
type. - ServerTrustEvaluating: A protocol describing the API used to evaluate server trusts.
-
URLConvertible:
Types adopting the
URLConvertible
protocol can be used to constructURL
s, which can then be used to constructURLRequests
. -
URLRequestConvertible:
Types adopting the
URLRequestConvertible
protocol can be used to safely constructURLRequest
s.
-
Parameters:
A dictionary of parameters to apply to a
URLRequest
. -
AdaptHandler:
RequestAdapter
closure definition. -
RetryHandler:
RequestRetrier
closure definition. -
AFDataResponse:
Default type of
DataResponse
returned by Alamofire, with anAFError
Failure
type. -
AFDownloadResponse:
Default type of
DownloadResponse
returned by Alamofire, with anAFError
Failure
type. -
AFResult:
Default type of
Result
returned by Alamofire, with anAFError
Failure
type.
Generated at 2020-09-24T22:11:06+0000 using swift-doc 1.0.0-beta.4.
Types
- AF
- AFError
- AFError.MultipartEncodingFailureReason
- AFError.ParameterEncoderFailureReason
- AFError.ParameterEncoderFailureReason.RequiredComponent
- AFError.ParameterEncodingFailureReason
- AFError.ResponseSerializationFailureReason
- AFError.ResponseValidationFailureReason
- AFError.ServerTrustFailureReason
- AFError.ServerTrustFailureReason.Output
- AFError.URLRequestValidationFailureReason
- Adapter
- AlamofireExtension
- AlamofireNotifications
- ClosureEventMonitor
- CompositeEventMonitor
- CompositeTrustEvaluator
- ConnectionLostRetryPolicy
- DataRequest
- DataResponse
- DataResponseSerializer
- DecodableResponseSerializer
- DefaultTrustEvaluator
- DisabledEvaluator
- DownloadRequest
- DownloadRequest.Downloadable
- DownloadRequest.Options
- DownloadResponse
- Empty
- GoogleXSSIPreprocessor
- HTTPHeader
- HTTPHeaders
- HTTPMethod
- Interceptor
- JSONEncoding
- JSONParameterEncoder
- JSONResponseSerializer
- MultipartFormData
- NetworkReachabilityManager
- NetworkReachabilityManager.NetworkReachabilityStatus
- NetworkReachabilityManager.NetworkReachabilityStatus.ConnectionType
- PassthroughPreprocessor
- PinnedCertificatesTrustEvaluator
- PublicKeysTrustEvaluator
- Redirector
- Redirector.Behavior
- Request
- Request.State
- ResponseCacher
- ResponseCacher.Behavior
- Retrier
- RetryPolicy
- RetryResult
- RevocationTrustEvaluator
- RevocationTrustEvaluator.Options
- ServerTrustManager
- Session
- SessionDelegate
- StringResponseSerializer
- URLEncodedFormEncoder
- URLEncodedFormEncoder.ArrayEncoding
- URLEncodedFormEncoder.BoolEncoding
- URLEncodedFormEncoder.DataEncoding
- URLEncodedFormEncoder.DateEncoding
- URLEncodedFormEncoder.Error
- URLEncodedFormEncoder.KeyEncoding
- URLEncodedFormEncoder.SpaceEncoding
- URLEncodedFormParameterEncoder
- URLEncodedFormParameterEncoder.Destination
- URLEncoding
- URLEncoding.ArrayEncoding
- URLEncoding.BoolEncoding
- URLEncoding.Destination
- UploadRequest
- UploadRequest.Uploadable
Protocols
- AlamofireExtended
- CachedResponseHandler
- DataDecoder
- DataPreprocessor
- DataResponseSerializerProtocol
- DownloadResponseSerializerProtocol
- EmptyResponse
- EventMonitor
- ParameterEncoder
- ParameterEncoding
- RedirectHandler
- RequestAdapter
- RequestDelegate
- RequestInterceptor
- RequestRetrier
- ResponseSerializer
- ServerTrustEvaluating
- URLConvertible
- URLRequestConvertible
- UploadConvertible
- UploadableConvertible