MCPcopy
hub / github.com/jef/streetmerchant / sendJSON

Function sendJSON

src/web/index.ts:83–87  ·  view source on GitHub ↗
(response: ServerResponse, data: any)

Source from the content-addressed store, hash-verified

81}
82
83function sendJSON(response: ServerResponse, data: any) {
84 response.setHeader('Content-Type', contentTypeMap.json);
85 response.write(JSON.stringify(data));
86 response.end();
87}
88
89function sendConfig(response: ServerResponse) {
90 sendJSON(response, config);

Callers 2

sendConfigFunction · 0.85
handleAPIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected