import { response } from "https://deno.land/x/cav@0.0.20/http.ts";
Creates an EndpointResponse from the provided body, which is serialized using the top-level serializeBody function. If the provided body is already a Response object, it will be returned with the headers provided on the init argument applied (if there are any). Extra serializers can be provided on the init argument to extend the data types that can be serialized.
Parameters
body: T
optional
init: EndpointResponseInitReturns
EndpointResponse<T extends EndpointResponse<infer T2> ? T2 : T extends Response ? unknown : T>