import { type CtxArg } from "https://deno.land/x/cav@0.0.21/rpc.ts";
Arguments available to the Ctx function of an Rpc.
Properties
res: ResponseInit & { headers: Headers; }
A ResponseInit applied to the Rpc response after resolving and packing the value to send to the client. The Headers object is always available. If the resolved value is a Response object already, the status and statusText will be ignored but the headers will still be applied.
cookie: Cookie
The cookie constructed after the Rpc path matched the request. For socket Rpcs, the cookies can only be altered inside the Ctx function. Alterations inside the other event handlers won't be synced with the client because the Response object was already sent.