* Creates a new Header instance. * @param {string} name - The name of the header. * @param {BytesValue} value - The value of the header. * @throws {Error} If the value is not an instance of BytesValue.
(name, value)
| 97 | * @throws {Error} If the value is not an instance of BytesValue. |
| 98 | */ |
| 99 | constructor(name, value) { |
| 100 | this._name = name |
| 101 | if (!(value instanceof BytesValue)) { |
| 102 | throw new Error(`Value must be an instance of BytesValue. Received: '${value}'`) |
| 103 | } |
| 104 | this._value = value |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Gets the name of the header. |
nothing calls this directly
no outgoing calls
no test coverage detected