1.0.1 • Published 4 years ago
@kauai/body v1.0.1
@kauai/body 
 
 
 
 
 
 
 
 
 
 
Kauai body parser middleware. Supports the following content types
application/jsonapplication/x-www-form-urlencodedplain/text
and any combination of the following encodings
brx-gzipgzipdeflate
Installation
npm install @kauai/bodyUsage
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