import { type ResolveArg } from "https://deno.land/x/cav@0.0.21/rpc.ts";
Arguments available to a Resolver function.
Properties
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.
If this isn't a socket-type Rpc, this will be the parsed request body.
Searches for an asset on disk and either returns a Response containing that asset or throws a 404 HttpError if the asset isn't found. See the documentation for the top-level asset() function for more details; this function is the same thing but bound to the Request received by the Rpc.
Returns a redirect Response. If the redirect path doesn't specify an origin, the origin of the current request is used. If the path starts with a ".", it is joined with the pathname of the request to get the final redirect path. If the status isn't provided, 302 is used.
Upgrades the request to become a web socket. This is only available if the
upgrade
init option is true
. The Response returned by this function
should be returned by the Rpc's resolve function.