我是靠谱客的博主 怕黑薯片,这篇文章主要介绍node.js中的http.response.addTrailers方法使用说明,现在分享给大家,希望可以做个参考。

方法说明:

该棒法用来将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();

最后

以上就是怕黑薯片最近收集整理的关于node.js中的http.response.addTrailers方法使用说明的全部内容,更多相关node.js中内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(263)

评论列表共有 0 条评论

立即
投稿
返回
顶部