Module

x/hono/context.ts>Context

Fast, Lightweight, Web-standards
Very Popular
Go to Latest
class Context
import { Context } from "https://dotland.deno.dev/x/hono@v3.11.12/context.ts";

Constructors

new
Context(req: HonoRequest<P, I["out"]>, options?: ContextOptions<E>)

Type Parameters

optional
E extends Env = any
optional
P extends string = any
optional
I extends Input = { }

Properties

private
_var: E["Variables"]
private
notFoundHandler: NotFoundHandler<E>
private
renderer: Renderer
body: BodyRespond
env: E["Bindings"]
error: Error | undefined
readonly
event: FetchEventLike
readonly
executionCtx: ExecutionContext
finalized: boolean
get: Get<E>
header: (
name: string,
value: string | undefined,
options?: { append?: boolean; },
) => void
html: HTMLRespond
json: JSONRespond
deprecated
jsonT: JSONRespond
newResponse: NewResponse
notFound: () => Response | Promise<Response>
redirect: (location: string, status?: StatusCode) => Response
render: Renderer
req: HonoRequest<P, I["out"]>
res: Response
deprecated
readonly
runtime: Runtime
set: Set<E>
setRenderer: (renderer: Renderer) => unknown
status: (status: StatusCode) => void
stream: (
cb: (stream: StreamingApi) => Promise<void>,
arg?: StatusCode | ResponseInit,
headers?: HeaderRecord,
) => Response
streamText: (
cb: (stream: StreamingApi) => Promise<void>,
arg?: StatusCode | ResponseInit,
headers?: HeaderRecord,
) => Response
text: TextRespond
readonly
var: Readonly<E["Variables"] & ContextVariableMap>