1.0.1 • Published 6 years ago

magic-http-status v1.0.1

Weekly downloads
87
License
MIT
Repository
github
Last release
6 years ago

HTTP Status Codes and Messages

Build Status Greenkeeper badge

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
    });