连接时
res.status(400).send('wrong');
我找到了答案应该是这样的
res.setHeader('Content-Type', 'application/json'); res.statusCode = 400; res.end(JSON.stringify("not found"));