What is the purpose of the res.send() method in Express?

  • To send a response to the client
  • To receive data from the client
  • To redirect the client to another route
  • To render a view template
The res.send() method in Express is used to send a response back to the client. It is commonly used to send text, HTML, JSON, or other data as the response to an HTTP request. It is a fundamental method for responding to client requests in Express applications. The other options are not the primary purpose of res.send().
Add your answer
Loading...

Leave a comment

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