What is the use of response.writeHead() in Node.js?

What is the use of response.writeHead() in Node.js?

Geek Evident Asked on November 28, 2017 in Node JS.
Add Comment
  • 1 Answer(s)

      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.

      Geek Evident Answered on June 25, 2018.
      Add Comment

      Your Answer

      By posting your answer, you agree to the privacy policy and terms of service.