import { immutable } from "https://deno.land/x/acorn@0.0.11/handlers.ts";
Intended to provide an immutable response handler for a route.
The response value is used as the body of the response and cache control headers are set to indicate that the value is immutable.
Example
import { Router, immutable } from "https://deno.land/x/acorn/mod.ts";
const router = new Router();
router.all("/", immutable({ hello: "world" }));
router.listen({ port: 8080 });
Parameters
response: ResponseType
the value which will be returned to the client as "immutable"
optional
options: RouteOptions<R, BodyType, Params>Additional options which are used in conjunction with the route.
Returns
a handler with options passed through