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

Function serveHTTPBatch

packages/rpc/src/server.ts:355–361  ·  view source on GitHub ↗
(
  request: import("node:http").IncomingMessage,
  response: import("node:http").ServerResponse,
  rpc: SyncRPC | ShellRPC | WorkspaceRPC,
)

Source from the content-addressed store, hash-verified

353// capnweb (which would split capnweb's module identity in mixed
354// ESM/CJS contexts — the RpcTarget instanceof check then fails).
355export function serveHTTPBatch(
356 request: import("node:http").IncomingMessage,
357 response: import("node:http").ServerResponse,
358 rpc: SyncRPC | ShellRPC | WorkspaceRPC,
359): Promise<void> {
360 return nodeHttpBatchRpcResponse(request, response, rpc as unknown as RpcTarget);
361}
362
363function iterableToReadableStream<T>(it: AsyncIterable<T>): ReadableStream<T> {
364 const iterator = it[Symbol.asyncIterator]();

Callers 1

createHTTPServerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected