UNPKG

zents

Version:

ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.

34 lines 852 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RequestHeader = void 0; class RequestHeader { constructor(req) { this.data = new Map(); for (const [key, value] of Object.entries(req.headers)) { this.data.set(key, value); } } all() { return this.data.entries(); } get(key) { return this.data.get(key.toLowerCase()); } has(key) { return this.data.has(key.toLowerCase()); } remove(key) { this.data.delete(key.toLowerCase()); } set(key, value) { this.data.set(key.toLowerCase(), value); } getHost() { return this.data.get('host'); } getAccept() { return this.data.get('accept'); } } exports.RequestHeader = RequestHeader; //# sourceMappingURL=RequestHeader.js.map