import { Context } from "https://dotland.deno.dev/x/hono@v2.6.0/mod.ts";
Constructors
new
Context(req: Request<unknown, P>,
env?: E["Bindings"],
executionCtx?: FetchEvent | ExecutionContext | undefined,
notFoundHandler?: NotFoundHandler<E>,
Properties
private
notFoundHandler: NotFoundHandler<E>env: E["Bindings"]
Methods
private
_finalizeHeaders(incomingHeaders: Headers): HeaderField[]body(): Response
data: Data | null,
status?: StatusCode,
headers?: Headers,
cookie(): void
name: string,
value: string,
opt?: CookieOptions,
get<Key extends keyof ContextVariableMap>(key: Key): ContextVariableMap[Key]
get<T>(key: string): T
header(): void
name: string,
value: string,
options?: { append?: boolean; },
html(): Response
html: string,
status?: StatusCode,
headers?: Headers,
json<T>(): Response
object: T,
status?: StatusCode,
headers?: Headers,
newResponse(): Response
data: Data | null,
status: StatusCode,
headers?: Headers,
notFound(): Response | Promise<Response>
pretty(prettyJSON: boolean, space?: number): void
redirect(location: string, status?: StatusCode): Response
set<Key extends keyof ContextVariableMap>(key: Key, value: ContextVariableMap[Key]): void
set(key: string, value: unknown): void
status(status: StatusCode): void
text(): Response
text: string,
status?: StatusCode,
headers?: Headers,