stream.headers


在此流上接收到的缓冲初始头,或者如果应用不支持头或尚未接收到头,则为 undefined。对于服务器端流,这包含请求头(例如,:method:path:scheme)。对于客户端流,这包含响应头(例如,:status)。

🌐 The buffered initial headers received on this stream, or undefined if the application does not support headers or no headers have been received yet. For server-side streams, this contains the request headers (e.g., :method, :path, :scheme). For client-side streams, this contains the response headers (e.g., :status).

头部名称是小写字符串。多值头部表示为数组。该对象有 __proto__: null

🌐 Header names are lowercase strings. Multi-value headers are represented as arrays. The object has __proto__: null.