HTTPResponseStatus

public enum HTTPResponseStatus

A HTTP response status code.

  • Undocumented

    Declaration

    Swift

    case custom(code: UInt, reasonPhrase: String)
  • Undocumented

    Declaration

    Swift

    case `continue`
  • Undocumented

    Declaration

    Swift

    case switchingProtocols
  • Undocumented

    Declaration

    Swift

    case processing
  • ok

    Undocumented

    Declaration

    Swift

    case ok
  • Undocumented

    Declaration

    Swift

    case created
  • Undocumented

    Declaration

    Swift

    case accepted
  • Undocumented

    Declaration

    Swift

    case nonAuthoritativeInformation
  • Undocumented

    Declaration

    Swift

    case noContent
  • Undocumented

    Declaration

    Swift

    case resetContent
  • Undocumented

    Declaration

    Swift

    case partialContent
  • Undocumented

    Declaration

    Swift

    case multiStatus
  • Undocumented

    Declaration

    Swift

    case alreadyReported
  • Undocumented

    Declaration

    Swift

    case imUsed
  • Undocumented

    Declaration

    Swift

    case multipleChoices
  • Undocumented

    Declaration

    Swift

    case movedPermanently
  • Undocumented

    Declaration

    Swift

    case found
  • Undocumented

    Declaration

    Swift

    case seeOther
  • Undocumented

    Declaration

    Swift

    case notModified
  • Undocumented

    Declaration

    Swift

    case useProxy
  • Undocumented

    Declaration

    Swift

    case temporaryRedirect
  • Undocumented

    Declaration

    Swift

    case permanentRedirect
  • Undocumented

    Declaration

    Swift

    case badRequest
  • Undocumented

    Declaration

    Swift

    case unauthorized
  • Undocumented

    Declaration

    Swift

    case paymentRequired
  • Undocumented

    Declaration

    Swift

    case forbidden
  • Undocumented

    Declaration

    Swift

    case notFound
  • Undocumented

    Declaration

    Swift

    case methodNotAllowed
  • Undocumented

    Declaration

    Swift

    case notAcceptable
  • Undocumented

    Declaration

    Swift

    case proxyAuthenticationRequired
  • Undocumented

    Declaration

    Swift

    case requestTimeout
  • Undocumented

    Declaration

    Swift

    case conflict
  • Undocumented

    Declaration

    Swift

    case gone
  • Undocumented

    Declaration

    Swift

    case lengthRequired
  • Undocumented

    Declaration

    Swift

    case preconditionFailed
  • Undocumented

    Declaration

    Swift

    case payloadTooLarge
  • Undocumented

    Declaration

    Swift

    case uriTooLong
  • Undocumented

    Declaration

    Swift

    case unsupportedMediaType
  • Undocumented

    Declaration

    Swift

    case rangeNotSatisfiable
  • Undocumented

    Declaration

    Swift

    case expectationFailed
  • Undocumented

    Declaration

    Swift

    case misdirectedRequest
  • Undocumented

    Declaration

    Swift

    case unprocessableEntity
  • Undocumented

    Declaration

    Swift

    case locked
  • Undocumented

    Declaration

    Swift

    case failedDependency
  • Undocumented

    Declaration

    Swift

    case upgradeRequired
  • Undocumented

    Declaration

    Swift

    case preconditionRequired
  • Undocumented

    Declaration

    Swift

    case tooManyRequests
  • Undocumented

    Declaration

    Swift

    case requestHeaderFieldsTooLarge
  • Undocumented

    Declaration

    Swift

    case unavailableForLegalReasons
  • Undocumented

    Declaration

    Swift

    case internalServerError
  • Undocumented

    Declaration

    Swift

    case notImplemented
  • Undocumented

    Declaration

    Swift

    case badGateway
  • Undocumented

    Declaration

    Swift

    case serviceUnavailable
  • Undocumented

    Declaration

    Swift

    case gatewayTimeout
  • Undocumented

    Declaration

    Swift

    case httpVersionNotSupported
  • Undocumented

    Declaration

    Swift

    case variantAlsoNegotiates
  • Undocumented

    Declaration

    Swift

    case insufficientStorage
  • Undocumented

    Declaration

    Swift

    case loopDetected
  • Undocumented

    Declaration

    Swift

    case notExtended
  • Undocumented

    Declaration

    Swift

    case networkAuthenticationRequired
  • Whether responses with this status code may have a response body.

    Declaration

    Swift

    public var mayHaveResponseBody: Bool { get }
  • Initialize a HTTPResponseStatus from a given status and reason.

    Declaration

    Swift

    public init(statusCode: Int, reasonPhrase: String = "")

    Parameters

    statusCode

    The integer value of the HTTP response status code

    reasonPhrase

    The textual reason phrase from the response. This will be discarded in favor of the default if the statusCode matches one that we know.

  • The numerical status code for a given HTTP response status.

    Declaration

    Swift

    public var code: UInt { get }
  • The string reason phrase for a given HTTP response status.

    Declaration

    Swift

    public var reasonPhrase: String { get }
  • Declaration

    Swift

    public static func ==(lhs: HTTPResponseStatus, rhs: HTTPResponseStatus) -> Bool