MCPcopy Create free account
hub / github.com/cloudflare/computer / fetch

Method fetch

examples/think/src/agent.ts:106–112  ·  view source on GitHub ↗

Forwarded by WorkspaceProxy for computerd's outbound /ws upgrade.

(request: Request)

Source from the content-addressed store, hash-verified

104
105 /** Forwarded by WorkspaceProxy for computerd's outbound /ws upgrade. */
106 override async fetch(request: Request): Promise<Response> {
107 const url = new URL(request.url);
108 if (url.pathname === "/ws") {
109 return this.#containerBackend.handleFetch(request);
110 }
111 return super.fetch(request);
112 }
113
114 /**
115 * Hand out a typed RPC stub to the workspace. The worker backend's

Callers

nothing calls this directly

Calls 2

fetchMethod · 0.65
handleFetchMethod · 0.45

Tested by

no test coverage detected