1.0.1 • Published 6 years ago
magic-http-status v1.0.1
HTTP Status Codes and Messages
Install
# With yarn
yarn add magic-http-status
# Or with npm
npm i magic-http-status
Why
To easily prevent using magic numbers for HTTP request and not having to recreate each time variable or enums...
Example
import { MESSAGES, CODES } from 'magic-http-status';
response
.status(CODES.OK)
.send({
message: MESSAGES.OK
});