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

x/deno_nest/modules/hono/deps.ts>HonoRequest

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
class HonoRequest
import { HonoRequest } from "https://deno.land/x/deno_nest@v3.5.0/modules/hono/deps.ts";

Constructors

new
HonoRequest(
request: Request,
path?: string,
paramStash?: ParamStash,
)

Type Parameters

optional
P extends string = "/"
optional
I extends Input["out"] = { }

Properties

private
_p: ParamIndexMap | Params
private
_s: ParamStash
private
cachedBody: (key: keyof Body) => unknown
private
vData: [K in keyof ValidationTargets]?: { }
deprecated
readonly
body
bodyCache: BodyCache
deprecated
readonly
bodyUsed
deprecated
readonly
headers
deprecated
readonly
integrity
deprecated
readonly
keepalive
readonly
method
path: string
raw: Request
deprecated
readonly
referrer
deprecated
readonly
signal
readonly
url

Methods

addValidatedData(target: keyof ValidationTargets, data: { })
arrayBuffer(): Promise<ArrayBuffer>
blob(): Promise<Blob>
formData(): Promise<FormData>
header(name: string): string | undefined
header(): Record<string, string>
json<T = any>(): Promise<T>
param<P2 extends string = P>(key: RemoveQuestion<ParamKeys<P2>>): UndefinedIfHavingQuestion<ParamKeys<P2>>
param<P2 extends string = P>(): UnionToIntersection<ParamKeyToRecord<ParamKeys<P2>>>
parseBody<T extends BodyData = BodyData>(options?: ParseBodyOptions): Promise<T>
queries(key: string): string[] | undefined
queries(): Record<string, string[]>
query(key: string): string | undefined
query(): Record<string, string>
setParams(params: ParamIndexMap | Params)
text(): Promise<string>
valid<T extends keyof I & keyof ValidationTargets>(target: T): InputToDataByTarget<I, T>