Skip to content
Myr

feat(body-parse): a body parse middleware (#38)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Minghe · committed by GitHub · parent 511c0eb · Browse files · 5 files+100 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+100 added−0 removed

  • tests:+68 added−0 removed
  • other:+32 added−0 removed

5 files+100 added−0 removed

modified:example/basic/index.js+6 added
added:src/middleware/body-parse/body-parse.test.ts+68 added
added:src/middleware/body-parse/body-parse.ts+23 added
modified:src/hono.ts+1 added
11 unmodified lines
12declare global {13 interface Request {14 params: (key: string) => string15 query: (key: string) => string | null16 parsedBody: any17 }18}1920export type Handler = (c: Context, next?: Function) => Response | Promise<Response>
157 unmodified lines
modified:src/middleware.ts+2 added