@caviajs/http-body
v1.0.7
Published
a micro framework for node.js
Downloads
19
Readme
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: '/',
});