stream.oninfo
- 类型:<Function>
当从服务器接收到信息性(1xx)头时要调用的回调。回调接收 (headers),其中 headers 是与 stream.headers 格式相同的对象。信息性头在最终响应之前发送(例如,103 Early Hints)。如果在不支持头的会话上设置,则抛出 ERR_INVALID_STATE。可读/可写。
🌐 The callback to invoke when informational (1xx) headers are received from
the server. The callback receives (headers) where headers is an object
in the same format as stream.headers. Informational headers are sent
before the final response (e.g., 103 Early Hints). Throws
ERR_INVALID_STATE if set on a session that does not support headers.
Read/write.