@woopidi/status-codes
v1.0.17
Published
Http status codes
Downloads
21
Readme
status-codes
Install
npm install @woopidi/status-codes --save
Example
import { StatusCode, Types } from "@woopdi/status-codes";
app.get('/', (req, res) => {
res.status(StatusCode.OK).send('Hello World')
});
Codes
| Constant | Code | | ------------ | ------------- | | CONTINUE | 100 | | SWITCH_PROTOCOLS | 101 | | PROCESSING | 102 | | EARLY_HINTS | 103 | | OK | 200 | | CREATED | 201 | | ACCEPTED | 202 | | BAD_REQUEST | 400 | | UNAUTHORIZED | 401 | | PAYMENT_REQUIRED | 402 | | FORBIDDEN | 403 |