Skip to content

A TypeScript enum for HTTP status codes

License

Notifications You must be signed in to change notification settings

0xCLARITY/http-status

 
 

Repository files navigation

@xpring-eng/http-status

NPM version badge

A TypeScript enum for HTTP status codes.

Usage

This enum was designed to remove "magic numbers" of HTTP status codes from our codebases. Instead, you can access a human-readable alias for any numeric HTTP status code using HttpStatus.Status.

import HttpStatus from '@xpring-eng/http-status'

console.log(HttpStatus.NotFound) // Logs 404

Status Codes

All official HTTP status codes are included, as well as popular status codes used by NGINX, Microsoft, Twitter, etc.

About

A TypeScript enum for HTTP status codes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 71.3%
  • JavaScript 28.7%