本页还没有译文
本页 8 段还没译成简体中文,下面显示的是英文原文。Fetch HTML
还没翻译译自英文(developers.cloudflare.com)本页 8 段都还没译
If you want to get started quickly, click on the button below.
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
JavaScriptTypeScriptPythonHono
export default {
async fetch(request) {
/**
* Replace `remote` with the host you wish to send requests to
*/
const remote = "https://example.com";
return await fetch(remote, request);
},
};export default {
async fetch(request: Request): Promise<Response> {
/**
* Replace `remote` with the host you wish to send requests to
*/
const remote = "https://example.com";
return await fetch(remote, request);
},
};from workers import WorkerEntrypoint
from js import fetch
class Default(WorkerEntrypoint):
async def fetch(self, request):
# Replace `remote` with the host you wish to send requests to
remote = "https://example.com"
return await fetch(remote, request)import { Hono } from "hono";
const app = new Hono();
app.all("*", async (c) => {
/**
* Replace `remote` with the host you wish to send requests to
*/
const remote = "https://example.com";
// Forward the request to the remote server
return await fetch(remote, c.req.raw);
});
export default app;AI 翻译查看英文原文