MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / writeJson

Function writeJson

tools/mock-openai/server.mjs:7–11  ·  view source on GitHub ↗
(res, statusCode, data)

Source from the content-addressed store, hash-verified

5const port = Number.parseInt(process.env.MOCK_OPENAI_PORT || '8790', 10)
6
7function writeJson(res, statusCode, data) {
8 res.statusCode = statusCode
9 res.setHeader('content-type', 'application/json; charset=utf-8')
10 res.end(JSON.stringify(data))
11}
12
13async function readJson(req) {
14 const chunks = []

Callers 1

server.mjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected