import { HonoRequest } from "https://deno.land/x/hono@v4.1.0/mod.ts";
Constructors
Type Parameters
optional
I extends Input["out"] = { }Properties
Methods
private
getAllDecodedParams(): Record<string, string>private
getDecodedParam(key: string): string | undefinedprivate
getParamValue(paramKey: any): string | undefinedaddValidatedData(target: keyof ValidationTargets, data: { })
arrayBuffer(): Promise<ArrayBuffer>
.arrayBuffer()
parse Request body as an ArrayBuffer
header(name: string): string | undefined
.header()
can get the request header value.
header(): Record<string, string>
json<T = any>(): Promise<T>
.json()
can parse Request body of type application/json
param<P2 extends string = P>(key: RemoveQuestion<ParamKeys<P2>>): UndefinedIfHavingQuestion<ParamKeys<P2>>
.req.param()
gets the path parameters.
parseBody<T extends BodyData = BodyData>(options?: ParseBodyOptions): Promise<T>
.parseBody()
can parse Request body of type multipart/form-data
or application/x-www-form-urlencoded
queries(key: string): string[] | undefined
.queries()
can get multiple querystring parameter values, e.g. /search?tags=A&tags=B
queries(): Record<string, string[]>
query(key: string): string | undefined
.query()
can get querystring parameters.
query(): Record<string, string>
text(): Promise<string>
.text()
can parse Request body of type text/plain
valid<T extends keyof I & keyof ValidationTargets>(target: T): InputToDataByTarget<I, T>