import { type ResolveArg } from "https://deno.land/x/cav@0.0.8/mod.ts";
Arguments available to a Resolver function.
Type Parameters
Properties
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 error 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.
Packs a response to return. Because the return value of the resolver is already processed and packed, you should only need this if you want to set status/Text explicitly.
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.