HttpStatusCode

data class HttpStatusCode

Represents an HTTP status code and description.

Parameters

value - is a numeric code.

description - is free form description of a status.

Constructors

<init>

HttpStatusCode(value: Int, description: String)

Represents an HTTP status code and description.

Properties

description

val description: String

is free form description of a status.

value

val value: Int

is a numeric code.

Functions

description

fun description(value: String): HttpStatusCode

Returns a copy of this code with a description changed to value.

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String

Companion Object Properties

Accepted

val Accepted: HttpStatusCode

BadGateway

val BadGateway: HttpStatusCode

BadRequest

val BadRequest: HttpStatusCode

Conflict

val Conflict: HttpStatusCode

Continue

val Continue: HttpStatusCode

Created

val Created: HttpStatusCode

ExpectationFailed

val ExpectationFailed: HttpStatusCode

FailedDependency

val FailedDependency: HttpStatusCode

Forbidden

val Forbidden: HttpStatusCode

Found

val Found: HttpStatusCode

GatewayTimeout

val GatewayTimeout: HttpStatusCode

Gone

val Gone: HttpStatusCode

InsufficientStorage

val InsufficientStorage: HttpStatusCode

InternalServerError

val InternalServerError: HttpStatusCode

LengthRequired

val LengthRequired: HttpStatusCode

Locked

val Locked: HttpStatusCode

MethodNotAllowed

val MethodNotAllowed: HttpStatusCode

MovedPermanently

val MovedPermanently: HttpStatusCode

MultiStatus

val MultiStatus: HttpStatusCode

MultipleChoices

val MultipleChoices: HttpStatusCode

NoContent

val NoContent: HttpStatusCode

NonAuthoritativeInformation

val NonAuthoritativeInformation: HttpStatusCode

NotAcceptable

val NotAcceptable: HttpStatusCode

NotFound

val NotFound: HttpStatusCode

NotImplemented

val NotImplemented: HttpStatusCode

NotModified

val NotModified: HttpStatusCode

OK

PartialContent

val PartialContent: HttpStatusCode

PayloadTooLarge

val PayloadTooLarge: HttpStatusCode

PaymentRequired

val PaymentRequired: HttpStatusCode

PermanentRedirect

val PermanentRedirect: HttpStatusCode

PreconditionFailed

val PreconditionFailed: HttpStatusCode

Processing

val Processing: HttpStatusCode

ProxyAuthenticationRequired

val ProxyAuthenticationRequired: HttpStatusCode

RequestHeaderFieldTooLarge

val RequestHeaderFieldTooLarge: HttpStatusCode

RequestTimeout

val RequestTimeout: HttpStatusCode

RequestURITooLong

val RequestURITooLong: HttpStatusCode

RequestedRangeNotSatisfiable

val RequestedRangeNotSatisfiable: HttpStatusCode

ResetContent

val ResetContent: HttpStatusCode

SeeOther

val SeeOther: HttpStatusCode

ServiceUnavailable

val ServiceUnavailable: HttpStatusCode

SwitchProxy

val SwitchProxy: HttpStatusCode

SwitchingProtocols

val SwitchingProtocols: HttpStatusCode

TemporaryRedirect

val TemporaryRedirect: HttpStatusCode

TooManyRequests

val TooManyRequests: HttpStatusCode

Unauthorized

val Unauthorized: HttpStatusCode

UnprocessableEntity

val UnprocessableEntity: HttpStatusCode

UnsupportedMediaType

val UnsupportedMediaType: HttpStatusCode

UpgradeRequired

val UpgradeRequired: HttpStatusCode

UseProxy

val UseProxy: HttpStatusCode

VariantAlsoNegotiates

val VariantAlsoNegotiates: HttpStatusCode

VersionNotSupported

val VersionNotSupported: HttpStatusCode

allStatusCodes

val allStatusCodes: List<HttpStatusCode>

All known status codes

Companion Object Functions

fromValue

fun fromValue(value: Int): HttpStatusCode

Creates an instance of HttpStatusCode with the given numeric value.

Extension Functions

isSuccess

fun HttpStatusCode.isSuccess(): Boolean

Checks if a given status code is a success code according to HTTP standards.

Companion Object Extension Properties

ExceptionFailed

val HttpStatusCode.Companion.ExceptionFailed: HttpStatusCode