Module

x/hono/request.ts>HonoRequest

Lightweight, Ultrafast, Web Standards
Extremely Popular
Go to Latest
class HonoRequest
import { HonoRequest } from "https://dotland.deno.dev/x/hono@v3.9.2/request.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>
text(): Promise<string>
valid<T extends keyof I & keyof ValidationTargets>(target: T): InputToDataByTarget<I, T>