0.0.1-beta • Published 3 years ago

@lid-http/body v0.0.1-beta

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

lid body parser

example

import { lid, route, t, bodyParser } from "TODO";

const app = lid();

app.use(bodyParser());

const routeA = route("POST", "/test")
  .body(t.Object({ name: t.String() }))
  .handle((ctx) => {
    console.log(ctx.body.name); // string
    return { name: ctx.body.name.toUpperCase() };
  });
0.0.1-beta

3 years ago