CustomStatus

data class CustomStatus(val code: Int, val type: HttpStatusType = when (code) { in 100..199 -> INFORMATION in 200..299 -> SUCCESS in 300..399 -> REDIRECTION in 400..499 -> CLIENT_ERROR in 500..599 -> SERVER_ERROR else -> throw IllegalArgumentException(INVALID_CODE_ERROR_MESSAGE + code) }) : HttpStatus

Constructors

Link copied to clipboard
fun CustomStatus(code: Int, type: HttpStatusType = when (code) { in 100..199 -> INFORMATION in 200..299 -> SUCCESS in 300..399 -> REDIRECTION in 400..499 -> CLIENT_ERROR in 500..599 -> SERVER_ERROR else -> throw IllegalArgumentException(INVALID_CODE_ERROR_MESSAGE + code) })

Properties

Link copied to clipboard
open override val code: Int
Link copied to clipboard
open override val type: HttpStatusType