1.0.7 • Published 6 months ago

@caviajs/http-body v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months 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

6 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.1.0

2 years ago