Enumerations
The following enumerations are available globally.
-
AFError
is the error type returned by Alamofire. It encompasses a few different types of errors, each with their own associated reasons.- explicitlyCancelled: Returned when a
Request
is explicitly cancelled. - invalidURL: Returned when a
URLConvertible
type fails to create a validURL
. - parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process.
- multipartEncodingFailed: Returned when some step in the multipart encoding process fails.
- responseValidationFailed: Returned when a
validate()
call fails. - responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process.
- certificatePinningFailed: Returned when a response fails certificate pinning.
Declaration
Swift
public enum AFError : Error
- explicitlyCancelled: Returned when a
-
Declaration
Swift
public enum HTTPMethod : String
-
Used to represent whether a request was successful or encountered an error.
success: The request and all post processing operations were successful resulting in the serialization of the provided associated value.
failure: The request encountered an error resulting in a failure. The associated values are the original data provided by the server as well as the error that caused the failure.
Declaration
Swift
public enum Result<Value>