HttpStatusCode

data class HttpStatusCode(value: Int, description: String)

Represents an HTTP status code and description.

Parameters

value

is a numeric code.

description

is free form description of a status.

Constructors

Link copied to clipboard
fun HttpStatusCode(value: Int, description: String)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun description(value: String): HttpStatusCode

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

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val description: String
Link copied to clipboard
val value: Int

Extensions

Link copied to clipboard
fun HttpStatusCode.isSuccess(): Boolean

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