Home  >  Article  >  Web Front-end  >  node.js中的http.response.getHeader方法使用说明_node.js

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

WBOY
WBOYOriginal
2016-05-16 16:27:211494browse

方法说明:

读取已经列队但尚未发送给客户端的头信息。

语法:

复制代码 代码如下:

response.getHeader(name)

接收参数:

name          响应头的类型,注意这个名字是不区分大小写。

例子:

复制代码 代码如下:

var contentType = response.getHeader('content-type');
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn