Module

x/hono/mod.ts>HonoRequest#param

Web Framework built on Web Standards
Extremely Popular
Go to Latest
method HonoRequest.prototype.param
import { HonoRequest } from "https://dotland.deno.dev/x/hono@v4.2.6/mod.ts";

.req.param() gets the path parameters.

Examples

Example 1

const name = c.req.param('name')
// or all parameters at once
const { id, comment_id } = c.req.param()

Type Parameters

optional
P2 extends string = P

Parameters

key: RemoveQuestion<ParamKeys<P2>>

Returns

UndefinedIfHavingQuestion<ParamKeys<P2>>

Type Parameters

optional
P2 extends string = P

Returns

UnionToIntersection<ParamKeyToRecord<ParamKeys<P2>>>