手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >node.js中的http.response.addTrailers方法使用说明
node.js中的http.response.addTrailers方法使用说明
摘要:方法说明:该棒法用来将HTTPtrailing响应头添加到消息尾部。语法:复制代码代码如下:response.addTrailers(hea...

方法说明:

该棒法用来将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方法使用说明】相关文章:

简介JavaScript中的setTime()方法的使用

JavaScript中for循环的使用详解

JavaScript中search()方法的使用

JavaScript中的pow()方法使用

JavaScript中的bold()方法使用详解

浅谈JavaScript中的Math.atan()方法的使用

JavaScript中的setUTCDate()方法使用详解

Node.js的MongoDB驱动Mongoose基本使用教程

js中setTimeout()与clearTimeout()用法实例浅析

JavaScript中的anchor()方法使用详解

精品推荐
分类导航