Skip to Content
Drash v3 is in beta. APIs may change.

StatusCode

import { StatusCode } from "@drashland/drash/core/http/response/StatusCode.js"; StatusCode.NotFound; // 404

Name to number, without the description.

StatusCode: Record<ResponseStatusName, number>

62 entries, keyed by StatusName. Its values are the code half of every Status entry — reach for this one when you want the number alone, such as setting Response.status directly.

Not re-exported from the HTTP module; see Status.

Last updated on