Nodejs中http响应头 设置中文格式不乱码
Nodejs中http响应头 设置中文格式不乱码const http = require("http");const app = http.createServer((req, res) => { // node 响应头返回中文 res.setHeader("Content-Type", "text/html;charset=utf8");});app.listen(8000, () => { console.log("8000开启成功") })...
原创
2021-11-14 10:21:17 ·
1456 阅读 ·
0 评论