1.參數(shù)類型區(qū)別
- res.send()參數(shù)可以是一個buffer對象炕倘,字符串,一個對象或者一個數(shù)組
- res.end()參數(shù)類型只能是buffer對象或者字符串
2.res.send()會自動發(fā)送更多的響應(yīng)報文頭
其中就有Content-Type:text/html;charset=utf-8
所以沒有亂碼
res.send('hello world!!!小明');
1.參數(shù)類型區(qū)別
2.res.send()會自動發(fā)送更多的響應(yīng)報文頭
其中就有Content-Type:text/html;charset=utf-8
所以沒有亂碼
res.send('hello world!!!小明');