(res, status, payload)
| 62 | } |
| 63 | |
| 64 | function json(res, status, payload) { |
| 65 | const body = Buffer.from(JSON.stringify(payload)); |
| 66 | res.writeHead(status, { |
| 67 | "Content-Type": "application/json", |
| 68 | "Content-Length": body.length, |
| 69 | "Cache-Control": "no-store" |
| 70 | }); |
| 71 | res.end(body); |
| 72 | } |
| 73 | |
| 74 | function text(res, status, body) { |
| 75 | res.writeHead(status, { "Content-Type": "text/plain; charset=utf-8" }); |
no outgoing calls
no test coverage detected