docs: update HandlerContext -> FreshContext (#3092)

'HandlerContext' is deprecated.deno-ts(6385)
This commit is contained in:
Zichao Lan
2025-07-13 23:21:56 +02:00
committed by GitHub
parent e2699923b0
commit 3c43d98a57
+2 -2
View File
@@ -68,10 +68,10 @@ In the below example, a custom handler is used to add a custom header to the
response after rendering the page component.
```tsx routes/html.tsx
import { HandlerContext, Handlers, PageProps } from "$fresh/server.ts";
import { FreshContext, Handlers, PageProps } from "$fresh/server.ts";
export const handler: Handlers = {
async GET(_req: Request, ctx: HandlerContext) {
async GET(_req: Request, ctx: FreshContext) {
const resp = await ctx.render();
resp.headers.set("X-Custom-Header", "Hello World");
return resp;