node.js - How response.end and response.send differs? -
hi trying build simple application using express js. new node , express js. can explain difference in response.end , response.send
i tried command , both sent request(message) server.
res.send('send message'); res.end('send message');
res.send() method built express, , make automatically assume content-type of html.
res.end(), on other hand, uses underlying end() implementation built nodejs on response stream (aka. not express), doesn't attempt assume content-type.
Comments
Post a Comment