res.send()
res.send()
is a method used to send a response back to the client. It’s a versatile function that can handle various types of responses, such as HTML, plain text, or even binary data. When you use res.send()
, Express automatically sets the appropriate Content-Type header based on the type of data you’re sending.