MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / fetch

Function fetch

packages/cloud-artifacts/src/index.ts:19–29  ·  view source on GitHub ↗
(req: Request, env: Env)

Source from the content-addressed store, hash-verified

17
18export default {
19 async fetch(req: Request, env: Env): Promise<Response> {
20 const url = new URL(req.url)
21
22 if (req.method === 'GET') {
23 return handleGet(url, env)
24 }
25 if (url.pathname === '/upload' && req.method === 'POST') {
26 return handleUpload(req, env, url)
27 }
28 return json({ error: 'not_found' }, 404)
29 },
30} satisfies ExportedHandler<Env>
31
32// GET /7d/<id>.html 或 /30d/<id>.html —— 从 R2 读,返回 text/html

Callers 15

downloadAndDecryptFunction · 0.85
uploadFileFunction · 0.85
downloadRemoteToTempFunction · 0.85
startLoginFunction · 0.85
waitForLoginFunction · 0.85
postFunction · 0.85
uploadArtifactFunction · 0.85
callFunction · 0.85
registerViaRestMethod · 0.85
ChatInterfaceFunction · 0.85
convertToDataUrlFunction · 0.85
sendMessagesMethod · 0.85

Calls 3

handleGetFunction · 0.85
handleUploadFunction · 0.85
jsonFunction · 0.85

Tested by

no test coverage detected