Module

x/hono/mod.ts>HonoRequest

Ultrafast web framework for the Edges
Extremely Popular
Go to Latest
class HonoRequest
import { HonoRequest } from "https://dotland.deno.dev/x/hono@v3.7.0-rc.1/mod.ts";

Constructors

new
HonoRequest(
request: Request,
path?: string,
paramData?: Record<string, string> | undefined,
)

Type Parameters

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

Properties

private
cachedBody: (key: keyof Body) => unknown
private
paramData: Record<string, string> | undefined
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>(): 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>