Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/danet/src/deps.ts>HonoRequest#param

The most mature backend framework for Deno. Create awesome HTTP and WebSocket server as well as KVQueue workers !
Latest
method HonoRequest.prototype.param
import { HonoRequest } from "https://deno.land/x/danet@2.4.0/src/deps.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>>>