UNPKG

tspace-spear

Version:

tspace-spear is a lightweight API framework for Node.js that is fast and highly focused on providing the best developer experience. It utilizes the native HTTP server

15 lines 547 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WriteHeader = void 0; const WriteHeader = (statusCode, contentType) => { return (target, key, descriptor) => { const originalMethod = descriptor.value; descriptor.value = async function (ctx, next) { ctx.res.writeHead(...[statusCode, contentType]); return await originalMethod.call(this, ctx, next); }; return descriptor; }; }; exports.WriteHeader = WriteHeader; //# sourceMappingURL=headers.js.map