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

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

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

  2020-05-13 我要评论

方法说明:

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

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们