Skip to main content
Module

x/hono/mod.ts>Context

Ultrafast web framework for the Edges
Extremely Popular
Go to Latest
class Context
import { Context } from "https://deno.land/x/hono@v3.5.4/mod.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
_exCtx: FetchEventLike | ExecutionContext | undefined
private
_h: Headers | undefined
private
_init: boolean
private
_map: Record<string, unknown> | undefined
private
_pH: Record<string, string> | undefined
private
_res: Response | undefined
private
_status: StatusCode
private
notFoundHandler: NotFoundHandler<E>
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
jsonT: JSONTRespond
newResponse: NewResponse
notFound: () => Response | Promise<Response>
redirect: (location: string, status?: StatusCode) => Response
req: HonoRequest<P, I["out"]>
deprecated
readonly
runtime: Runtime
set: Set<E>
status: (status: StatusCode) => void
text: TextRespond