关于express返回值的问题

app.post("/login",function(req,res){
  // 登陆功能,校验usersid,成功则告知成功,失败则告知失败
  const userId = req.session.userId;
  if(usermap.get(userId)){
    res.status(200).send('1'); 
  }else{
    res.status(200).send('0');
  }
})

上面的例子当中,send回去的值必须是字符串,但是前端收到的内容却是integer!!!

原文地址:https://www.cnblogs.com/lyzz1314/p/13648861.html