@caviajs/http-body
a micro framework for node.js
Introduction
This package contains HttpBody
which can be used to parse request body.
Usage
Installation
npm install @caviajs/http-body --save
Parsing
import { HttpBody } from '@caviajs/http-body';
router
.route({
handler: async (request, response, next) => {
// const body = await HttpBody.parse(request, 'stream');
// const body = await HttpBody.parse(request, 'buffer');
// const body = await HttpBody.parse(request, 'json');
// const body = await HttpBody.parse(request, 'string');
},
method: 'POST',
path: '/',
});