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 valid URL.
    • parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process.
    • parameterEncoderFailed: Returned when a parameter encoder throws an error during the encoding process.
    • multipartEncodingFailed: Returned when some step in the multipart encoding process fails.
    • requestAdaptationFailed: Returned when a RequestAdapter throws an error during request adaptation.
    • responseValidationFailed: Returned when a validate() call fails.
    • responseSerializationFailed: Returned when a response serializer throws an error in the serialization process.
    • serverTrustEvaluationFailed: Returned when a ServerTrustEvaluating instance fails during the server trust evaluation process.
    • requestRetryFailed: Returned when a RequestRetrier throws an error during the request retry process.
    See more

    Declaration

    Swift

    public enum AFError : Error
  • AF

    Global namespace containing API for the default Session instance.

    See more

    Declaration

    Swift

    public enum AF
  • 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.

    See more

    Declaration

    Swift

    public enum Result<Value>