import { Context } from "https://deno.land/x/hono@v3.0.0-rc.14/context.ts";
Constructors
new
Context(env?: E["Bindings"],
executionCtx?: FetchEvent | ExecutionContext | undefined,
notFoundHandler?: NotFoundHandler<E>,
Type Parameters
optional
E extends Partial<Environment> = EnvironmentProperties
private
_executionCtx: FetchEvent | ExecutionContext | undefinedprivate
_res: Response | undefinedprivate
_status: StatusCodeprivate
notFoundHandler: NotFoundHandler<E>body: () => Response
env: E["Bindings"]
readonly
executionCtx: ExecutionContexthtml: () => Response
json: <T>() => Response
newResponse: () => Response
redirect: (location: string, status?: StatusCode) => Response
res: Response
status: (status: StatusCode) => void
text: () => Response
Methods
private
_finalizeHeaders(incomingHeaders: Headers): HeaderField[]get<Key extends keyof ContextVariableMap>(key: Key): ContextVariableMap[Key]
get<T>(key: string): T
set<Key extends keyof ContextVariableMap>(key: Key, value: ContextVariableMap[Key]): void
set(key: string, value: unknown): void