打开主菜单
小青青的笔记
β
搜索
查看“Nodejs/http/IncomingMessage/headers”的源代码
←
Nodejs/http/IncomingMessage/headers
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
管理员
您可以查看与复制此页面的源代码。
请求或响应的消息头对象。 ==版本历史== * 新增于: v0.1.5 * 被搬运到这里:v10.15.3 ==类型== <[[Object]]> ==详情== 消息头的名称和值的键值对。 消息头的名称都是小写的。 <source lang="JavaScript"> // 打印类似以下: // // { 'user-agent': 'curl/7.22.0', // host: '127.0.0.1:8000', // accept: '*/*' } console.log(request.headers); </source> 原始消息头中的重复项会按以下方式处理,具体取决于消息头的名称: * 重复的 age、 authorization、 content-length、 content-type、 etag、 expires、 from、 host、 if-modified-since、 if-unmodified-since、 last-modified、 location、 max-forwards、 proxy-authorization、 referer、 retry-after 或 user-agent 会被丢弃。 * set-cookie 始终是一个数组。重复项都会添加到数组中。 * 对于重复的 cookie 消息头,其值会使用与 '; ' 连接到一起。 * 对于所有其他消息头,其值会使用 ', ' 连接到一起。
返回至
Nodejs/http/IncomingMessage/headers
。