New @small-web/kitten release (version 5.2.0)
Adds missing types on `KittenRequest` and `KittenResponse` interfaces (the missing request and response helpers).
• `is()`: check for request type. e.g., `request.is('html')` or `request.is('json')` (you can also use the full mimetype).
• `json()`: JSON.stringify passed data and end response with inline JSON.
• `jsonFile()`: JSON.stringify passed data and end response with JSON attachment and optional file name.
• `file()`: end response with passed file data and optional file name and mime type.
• `withCode()`: end response with passed status code and optional body.
Kitten request and response helpers documentation:
https://kitten.small-web.org/reference/#request-and-response-helpers
Kitten type safety tutorial:
https://kitten.small-web.org/tutorials/type-safety/
Enjoy!
:kitten:💕
#Kitten #SmallWeb #SmallTech #HTTP #TypeSafety #JavaScript #HTML #CSS #JSON #web #dev