simpsons-status
v1.0.3
Published
Custom http error responses made with The Simpsons.
Downloads
1
Readme
HTTP Simpsons Responses
Custom HTTP responses with The Simpsons with the intention of expanding to all existing HTTP code. If you are interested in collaborating, please review the corresponding section.
Installation
npm i simpsons-status
Usage/Examples
// Usage
import HttpMessage from 'simpsons-status'
app.get('/', (req: Request, res: Response) => {
res.send(HttpMessage.UNAUTHORIZED);
});
// Example
{
"url": "SimpsonImage",
"code": 401,
"message": "Unauthorized"
}
Contributing
Contributions are always welcome!
To contribute, you can make a PR with the code(s) you want to add to the library. If you don't know how to make one, check the Github article.
Authors
Credits
The images with their respective HTTP response states have been made by WinkHosting.