MCPcopy
hub / github.com/cloudflare/vibesdk / fetch

Method fetch

worker/services/secrets/UserSecretsStore.ts:52–60  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

50 }
51
52 async fetch(request: Request): Promise<Response> {
53 if (request.headers.get('Upgrade') !== 'websocket') {
54 return new Response('Expected WebSocket', { status: 426 });
55 }
56
57 const pair = new WebSocketPair();
58 this.ctx.acceptWebSocket(pair[1]);
59 return new Response(null, { status: 101, webSocket: pair[0] });
60 }
61
62 async webSocketMessage(ws: WebSocket, message: string | ArrayBuffer): Promise<void> {
63 try {

Callers 6

handleUserAppRequestFunction · 0.80
fetchFunction · 0.80
createAppFunction · 0.80
proxyToSandboxFunction · 0.80

Calls 1

getMethod · 0.65

Tested by

no test coverage detected