stream.pendingTrailers


设置在应用请求时自动发送尾部头信息。这是 stream.onwanttrailers 回调的一种替代方法,适用于在正文完成之前已知尾部信息的情况。如果在不支持头信息的会话上设置,将抛出 ERR_INVALID_STATE。可读/可写。

🌐 Set trailing headers to be sent automatically when the application requests them. This is an alternative to the stream.onwanttrailers callback for cases where the trailers are known before the body completes. Throws ERR_INVALID_STATE if set on a session that does not support headers. Read/write.