Which property of the response object is used to send an HTTP status code to the client?

  • statusCode
  • status
  • httpStatus
  • responseCode
To send an HTTP status code to the client in Node.js, you use the statusCode property of the response object. For example, response.statusCode = 200; sets the status code to 200 (OK). The other options are not standard properties for setting the status code.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *