Skip to content

Custom HTTP responses with The Simpsons with the intention of expanding to all existing HTTP code.

Notifications You must be signed in to change notification settings

brahianpdev/simpson-response

Repository files navigation

image

Simpson Status - Custom HTTP 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.

Verify that you have the version of node: v18.12.0

Installation

  npm i simpson-response

If you are working with typescript:

npm i --save-dev @types/simpson-response

Usage/Examples

// Usage
import SimpsonResponse from 'simpson-response'

app.get('/', (req: Request, res: Response) => {
	res.send(SimpsonResponse.default.UNAUTHORIZED);
});

// Example
{
  "url": "SimpsonImage",
  "code": 401,
  "message": "Unauthorized"
}

Contributing

Contributions are always welcome!

Steps for an effective contribution:

  • Upload the image of the http code to an image bank.
  • Create the object as follows: HTTPStatus { url, code, message }.
  • You can see an example of the previous step here.
  • Make a Pull Request. 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.

License

MIT

About

Custom HTTP responses with The Simpsons with the intention of expanding to all existing HTTP code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages