Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hono/mod.ts>HonoRequest#json

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
method HonoRequest.prototype.json
import { HonoRequest } from "https://deno.land/x/hono@v4.0.6/mod.ts";

.json() can parse Request body of type application/json

Examples

Example 1

app.post('/entry', async (c) => {
  const body = await c.req.json()
})

Type Parameters

optional
T = any

Returns

Promise<T>