MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / writeJson

Function writeJson

packages/codex-native-api/src/native_api_server.ts:3025–3030  ·  view source on GitHub ↗
(response: ServerResponse, status: number, body: JsonRecord)

Source from the content-addressed store, hash-verified

3023}
3024
3025function writeJson(response: ServerResponse, status: number, body: JsonRecord): void {
3026 response.writeHead(status, {
3027 'Content-Type': 'application/json; charset=utf-8',
3028 });
3029 response.end(JSON.stringify(body));
3030}
3031
3032function rawString(value: unknown): string {
3033 return typeof value === 'string' ? value : '';

Callers 7

startMethod · 0.70
handleRequestMethod · 0.70
authorizeMethod · 0.70
handleHealthMethod · 0.70
handleModelsMethod · 0.70
handleChatCompletionsMethod · 0.70
handleResponsesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected