HTTP Status Codes Utility
A preloaded shared instance of HttpStatus providing HTTP status code information and lookup helpers.
httpStatus
The httpStatus is a default shared instance of the HttpStatus class. It comes preloaded with all standard HTTP status codes and their metadata sourced from MDN documentation.
Import
import { httpStatus } from 'toolbox-x/http-status';
// or from main entry
import { httpStatus } from 'toolbox-x/http-status';Example Usage
playground.ts
Behavior Details
- Instance Extension: Since
httpStatusis an instance ofHttpStatus, you can dynamically add codes or override messages at runtime. These modifications will propagate to all consumers of the shared instance. - Custom Configs: If you need an isolated registry of status codes without mutating the shared global instance, instantiate the class directly via
new HttpStatus().
Related Documents
- HttpStatus Class — Low-level class details and method documentation.
Last updated: Sun, Jun 14, 2026 07:15:25PM (UTC)
