Module

x/hono/context.ts>Context

Ultrafast web framework for the Edges
Extremely Popular
Go to Latest
class Context
import { Context } from "https://dotland.deno.dev/x/hono@v3.7.0-rc.1/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
_exCtx: FetchEventLike | ExecutionContext | undefined
private
_h: Headers | undefined
private
_init: boolean
private
_pH: Record<string, string> | undefined
private
_renderer: Renderer
private
_res: Response | undefined
private
_status: StatusCode
private
_var: E["Variables"]
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
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"]>