BREAKING refactor: detach request from handler context (#114)

This commit is contained in:
Leo Kettmeir
2022-03-06 18:25:50 +01:00
committed by GitHub
parent 4556d2116d
commit cf48eafa9a
8 changed files with 45 additions and 33 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
export async function handler(_req: Request, handle: () => Promise<Response>) {
const resp = await handle();
import { MiddlewareHandlerContext } from "../server_deps.ts";
export async function handler(_req: Request, ctx: MiddlewareHandlerContext) {
const resp = await ctx.handle();
resp.headers.set("server", "fresh test server");
return resp;
}