(response: ServerResponse)
| 2992 | } |
| 2993 | |
| 2994 | function startSse(response: ServerResponse): void { |
| 2995 | response.writeHead(200, { |
| 2996 | 'Content-Type': 'text/event-stream; charset=utf-8', |
| 2997 | 'Cache-Control': 'no-cache, no-transform', |
| 2998 | Connection: 'keep-alive', |
| 2999 | 'X-Accel-Buffering': 'no', |
| 3000 | }); |
| 3001 | } |
| 3002 | |
| 3003 | function writeSseEvent(response: ServerResponse, payload: JsonRecord): void { |
| 3004 | if (response.writableEnded || response.destroyed) { |
no outgoing calls
no test coverage detected