afterEach provides a hook that is called after each handler call.
It can take the actual handler return value and return a Response object.
That is, you can define a custom response.
This hook is only called if a user-defined handler is called. That is, it will not be called:
import { URLRouter } from "https://deno.land/x/http_router/mod.ts"
URLRouter({
"/api": () => new Response()
}, {
afterEach: (res) => res
})(new Request("http://localhost/"))
afterEachprovides a hook that is called after each handler call.It can take the actual handler return value and return a
Responseobject.That is, you can define a custom response.
This hook is only called if a user-defined handler is called. That is, it will not be called: