🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

@kauai/body

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kauai/body

Kauai body parser middleware

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@kauai/body CI Status version Known Vulnerabilities Coverage Status code style: prettier semantic-release Conventional Commits GitHub top language node version npm downloads License

Kauai body parser middleware. Supports the following content types

  • application/json
  • application/x-www-form-urlencoded
  • plain/text

and any combination of the following encodings

  • br
  • x-gzip
  • gzip
  • deflate

Installation

npm install @kauai/body

Usage

import BodyParser from "@kauai/body";

class MyMiddleware extends Middleware {
  public run(context: Context): void {
    const { body } = context.request;
    context.log.info("Body has been parsed (or not)", { body });
  }
}

app.use("/deposit", new Router().post(new BodyParser(), new MyMiddleware()));

Test

npm run test:ci

Keywords

HTTP

FAQs

Package last updated on 12 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts