I am a beginner to express.js and I am trying to understand the difference between res.send and res.write ?
express.js
res.send
res.write
Content-Length
res.end()
app.get('/user/:id', function (req, res) { res.send('OK'); });
For more details:
response.write('<html>'); response.write('<body>'); response.write('<h1>Hello, World!</h1>'); response.write('</body>'); response.write('</html>'); response.end();
1.4m articles
1.4m replys
5 comments
57.0k users