What is the use of response.writeHead() in Node.js?
What is the use of response.writeHead() in Node.js?
Add Comment
Sends a response header to the request. The status code is a 3-digit HTTP status code, like 404. The last argument, headers, are the response headers. Optionally one can give a human-readable statusMessage as the second argument.