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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -