MCPcopy Create free account
hub / github.com/BlockRunAI/ClawRouter / writeJson

Function writeJson

test/test-e2e.ts:102–109  ·  view source on GitHub ↗
(res: ServerResponse, status: number, body: unknown)

Source from the content-addressed store, hash-verified

100}
101
102function writeJson(res: ServerResponse, status: number, body: unknown): void {
103 const text = JSON.stringify(body);
104 res.writeHead(status, {
105 "Content-Type": "application/json",
106 "Content-Length": Buffer.byteLength(text),
107 });
108 res.end(text);
109}
110
111function chatCompletion(model: string, content: string): Record<string, unknown> {
112 return {

Callers 1

startMockUpstreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected