Node.js——请求头
var http = require('http') var server = http.createServer(); server.on('request', function (req, res) { res.setHeader('Content-Type', 'text/plain;charset=utf8'); res.write('hello 世界'); res.end(); }) server.listen(8080, function () { console.log('server is running...') })