import { HonoContext } from "https://deno.land/x/deno_nest@v3.15.1/modules/hono/deps.ts";
Constructors
new
HonoContext(req: HonoRequest<P, I["out"]>, options?: ContextOptions<E>)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.
.error
can get the error object from the middleware if the Handler throws an error.
get: Get<E>
.get()
can use the value specified by the key.
.header()
can set headers.
redirect: (location: string, status?: RedirectStatusCode) => Response
.redirect()
can Redirect, default status code is 302.
req: HonoRequest<P, I["out"]>
.req
is the instance of HonoRequest.
res: Response
set: Set<E>
.set()
can set the value specified by the key.
.setRenderer()
can set the layout in the custom middleware.