Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 16:27:21
Original
1602 people have browsed it

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');
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template