-
Notifications
You must be signed in to change notification settings - Fork 0
Enums: HttpStatusCodes
alessbarb edited this page Sep 17, 2023
·
1 revision
File: http-status-codes.enum.ts
The HttpStatusCodes enum provides a comprehensive and type-safe list of HTTP status codes. This enum categorizes HTTP status codes into different response classes, such as Informational, Success, Redirection, Client Errors, and Server Errors.
- Comprehensive List: Includes a broad range of HTTP status codes.
- Type-Safety: Ensures the use of standardized HTTP status codes.
const statusCode = HttpStatusCodes.NOT_FOUND;- 1XX: Informational Responses
- 2XX: Successful Responses
- 3XX: Redirection Messages
- 4XX: Client Errors
- 5XX: Server Errors
Given the large number of enum members, here's a subset for quick reference:
| Key | Value | Description |
|---|---|---|
OK |
200 | Standard response for successful HTTP requests. |
NOT_FOUND |
404 | Resource not found. |
INTERNAL_SERVER_ERROR |
500 | Generic error, no specific message. |
Note: This table is a subset; for a complete list refer to the source code.
For a complete understanding of each status code, refer to the following:
error-enhanced Wiki
Version: 1.2.1 - © 2023
🔗 MIT License | 📦 GitHub Repository | 🐞 Report Issues | ✉️ Contact