import { Context } from "https://deno.land/x/hono@v4.2.7/context.ts";
Properties
private
_var: E["Variables"]private
notFoundHandler: NotFoundHandler<E>.body()
can return the HTTP response.
You can set headers with .header()
and set HTTP status code with .status
.
This can also be set in .text()
, .json()
and so on.
env: E["Bindings"]
.env
can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.
redirect: (location: string, status?: RedirectStatusCode) => Response
.redirect()
can Redirect, default status code is 302.
res: Response