node.js中的http.response.addTrailers方法使用说明

论坛 期权论坛 脚本     
nimin   2020-12-20 08:57   12   0

方法说明:

该棒法用来将HTTP trailing响应头添加到消息尾部。

语法:

复制代码 代码如下:

response.addTrailers(headers)

接收参数:

headers          响应头信息

例子:

复制代码 代码如下:

response.writeHead(200, { 'Content-Type': 'text/plain',   'Trailer': 'Content-MD5' });
response.write(fileData);
response.addTrailers({'Content-MD5': "7895bf4b8828b55ceaf47747b4bca667"});
response.end();
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1012780
帖子:202556
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP