HTTPError

public class HTTPError : Error

An error thrown when a response status code is not 2xx.

  • The status code of the response.

    Declaration

    Swift

    public let status: Int
  • The raw response body of the response.

    Declaration

    Swift

    public let data: Data
  • The headers of the response.

    Declaration

    Swift

    public let headers: [String : String]
  • Creates a new HTTPError with the given status code, headers and data

    Declaration

    Swift

    public init(status: Int, headers: [String : String], data: Data)