| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1× 43× 43× 4× 43× 4× 1× | const normalizeHeaderName = require("./utils/normalizeHeaderName");
class Header {
constructor(name, value) {
this.name = name;
this.value = value;
}
get name() {
return this._name;
}
set name(value) {
this._name = normalizeHeaderName(value);
}
toString() {
return `${this.name}: ${this.value}`;
}
}
module.exports = Header;
|