UNPKG

openapi-connect

Version:
15 lines 454 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.send = void 0; const http_1 = require("http"); const send = (res, code, result = undefined, headers = { 'Content-Type': 'application/json' }) => { res.writeHead(code, http_1.STATUS_CODES[code], headers); if (result) { res.end(JSON.stringify(result)); } else { res.end(); } }; exports.send = send; //# sourceMappingURL=response.js.map