@slpv/httpstatus

1.0.2 • Public • Published

httpstatus

A simple module for using HTTP codes as constants.

Install package:

npm i @slpv/httpstatus

Include package:

const HTTPStatus = require('@slpv/httpstatus');

Example using express.js framework

app.post("/", (req, res)) => {
    // TODO: Create method
    res
        .status(HTTPStatus.CREATED.code)
        .send(JSON.stringify({"message": "Created"}));
})

Readme

Keywords

none

Package Sidebar

Install

npm i @slpv/httpstatus

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

8.25 kB

Total Files

4

Last publish

Collaborators

  • slpv