Home  >  Article  >  Web Front-end  >  Instructions for using the http.response.getHeader method in node.js_node.js

Instructions for using the http.response.getHeader method in node.js_node.js

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

Method description:

Read header information that has been queued but not yet sent to the client.

Grammar:

Copy code The code is as follows:

response.getHeader(name)

Receive parameters:

name The type of response header. Note that this name is not case-sensitive.

Example:

Copy code The code is as follows:

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