stream.sendTrailers(headers)


  • headers <Object> 尾部头对象。伪头部不得包含在尾部中。
  • 返回:<boolean>

在流上发送尾部头信息。必须在 stream.onwanttrailers 回调期间同步调用,或通过 stream.pendingTrailers 事先设置。如果会话不支持头信息,则抛出 ERR_INVALID_STATE

🌐 Sends trailing headers on the stream. Must be called synchronously during the stream.onwanttrailers callback, or set ahead of time via stream.pendingTrailers. Throws ERR_INVALID_STATE if the session does not support headers.