1.0.7 • Published 2 years ago

@caviajs/http-body v1.0.7

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

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

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.0

3 years ago