0.0.7 • Published 3 years ago

wkrk-extended v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Extended

Handy extensions that returns native Request and Response objects.

Usage

This library provides a lot of utilities, but in the end, all you get is a native Resquest and Response objects to have maximum compatibility with all platforms including CloudFlare Workers, Node.js, and even Service Workers!

const res = new ExtendedResponse()
res.status(500).json({ user: "giovannibenussi" })

In the real world, you'll get an instance of ExtendedResponse provided by your framework of choice, so you'll rarely call the constructor.

You can perform a redirect by calling the .redirect method:

res.redirect('http://giovannibenussitest.com', 307)

As the philosophy of this library, the previous code is equivalent of calling Response.redirect with the added benefit of having utility classes to set headers, cookies, or whatever you want!

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago