* Send trailing headers on this stream. Must be called synchronously * during the onwanttrailers callback, or set via pendingTrailers before * the body completes. Throws if the application does not support headers. * @param {object} headers * @returns {boolean}
(headers)
| 2095 | * @returns {boolean} |
| 2096 | */ |
| 2097 | sendTrailers(headers) { |
| 2098 | assertIsQuicStream(this); |
| 2099 | if (this.destroyed) return false; |
| 2100 | if (getQuicSessionState(this.#inner.session).headersSupported === 2) { |
| 2101 | throw new ERR_INVALID_STATE( |
| 2102 | 'The negotiated QUIC application protocol does not support headers'); |
| 2103 | } |
| 2104 | validateObject(headers, 'headers'); |
| 2105 | const headerString = buildNgHeaderString(headers); |
| 2106 | return this.#handle.sendHeaders( |
| 2107 | kHeadersKindTrailing, headerString, kHeadersFlagsNone); |
| 2108 | } |
| 2109 | |
| 2110 | /** |
| 2111 | * Returns a Writer for pushing data to this stream incrementally. |
no test coverage detected