const requestHandler = createRequestHandler(
() => import("virtual:react-router/server-build"),
import.meta.env.MODE
);
export default {
async fetch(request, env, ctx) {
return requestHandler(request, {
cloudflare: { env, ctx },
});
},
} satisfies ExportedHandler<Env>;RequestHandler is doing at all, and the only documentation I can find for it [3] is no help at all. Using the provided fetch() function in the SPA is easy. How do I use the async fetch() function above to make remote requests? Suppose I just want to GET a file from a remote host? Should I rip out the RequestHandler() and simply treat it like a normal fetch? I can't find any examples on the internet using this function to make remote requests, let alone get files from R2.