@caviajs/http-body
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

@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: '/',
  });

Readme

Keywords

none

Package Sidebar

Install

npm i @caviajs/http-body

Weekly Downloads

0

Version

1.0.7

License

MIT

Unpacked Size

42.9 kB

Total Files

10

Last publish

Collaborators

  • pawpartyka