node.js中的http.response.addTrailers方法使用说明_node.js
来源:动视网
责编:小采
时间:2020-11-27 21:30:03
node.js中的http.response.addTrailers方法使用说明_node.js
node.js中的http.response.addTrailers方法使用说明_node.js:方法说明: 该棒法用来将HTTP trailing响应头添加到消息尾部。 语法: 代码如下: response.addTrailers(headers) 接收参数: headers 响应头信息 例子: 代码如下: response.writeHead(200, { 'Content-Type': 'text
导读node.js中的http.response.addTrailers方法使用说明_node.js:方法说明: 该棒法用来将HTTP trailing响应头添加到消息尾部。 语法: 代码如下: response.addTrailers(headers) 接收参数: headers 响应头信息 例子: 代码如下: response.writeHead(200, { 'Content-Type': 'text

方法说明:
该棒法用来将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
node.js中的http.response.addTrailers方法使用说明_node.js:方法说明: 该棒法用来将HTTP trailing响应头添加到消息尾部。 语法: 代码如下: response.addTrailers(headers) 接收参数: headers 响应头信息 例子: 代码如下: response.writeHead(200, { 'Content-Type': 'text