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

Function read

packages/computer/tests/script-runner.test.ts:19–23  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

17}
18
19async function read(path: string) {
20 const response = await SELF.fetch(`https://example.test/read?path=${encodeURIComponent(path)}`);
21 expect(response.status).toBe(200);
22 return response.text();
23}
24
25async function runtime(body: Record<string, unknown>) {
26 return SELF.fetch("https://example.test/runtime", {

Callers 1

Calls 2

fetchMethod · 0.65
textMethod · 0.65

Tested by

no test coverage detected