HttpStatusCodes

Properties

Link copied to clipboard

Ktor's HttpStatusCode companion properties, mapped to their numeric codes.

Functions

Link copied to clipboard
fun nameOf(code: Int): String?

The CamelCase status name (BadRequest for 400) — used as the shared component-response key.

Link copied to clipboard
fun phraseOf(code: Int): String?
Link copied to clipboard
fun resolve(expression: IrExpression): Int?

Statically resolves an HttpStatusCode expression: a companion property (HttpStatusCode.Created) or a constructor call (HttpStatusCode(422, "...")). Returns null for anything dynamic.