Home >Web Front-end >JS Tutorial >Instructions for using the http.response.setHeader method in node.js_node.js
Method description:
Set header file information.
If the information to be sent already contains a header file, the value of the header file will be overwritten after executing this method.
If a header file needs to pass multiple values, you can use an array.
Grammar:
Receive parameters:
name The type of response header. Note that this name is not case-sensitive.
value The value of the response header
Example: