Skip to content
Myr

refactor: make `parsedBody` type as `Body` (#448)

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

authored by Yusuke Wada · committed by GitHub · parent 6592182 · Browse files · 3 files+7 added−6 removed
This commit

State

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

Diff stats

3 files+7 added−6 removed

  • tests:+1 added−1 removed
  • other:+6 added−5 removed

3 files+7 added−6 removed

modified:src/utils/body.ts+3 added-3 removed
modified:src/hono.test.ts+1 added-1 removed
965 unmodified lines
966 app.post('/json', async (c) => {967 return c.json(await c.req.parseBody(), 200)968 })969 app.post('/text', async (c) => {970 return c.text(await c.req.parseBody(), 200)970 return c.text((await c.req.parseBody()) as string, 200)971 })972 app.post('/form', async (c) => {973 return c.json(await c.req.parseBody(), 200)974 })
47 unmodified lines
modified:src/request.ts+3 added-2 removed