title: I can't get data from req.body in nodesjs + expressjs
body: <p>This is my code:</p>
  
  <pre><code>var express        =         require("express");
  var bodyParser     =         require("body-parser");
  var app            =         express();
  
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(bodyParser.json());
  
  app.get('/',function(req,res){
    res.sendfile("index.html");
  });
  app.post('/login',function(req,res){
    console.log(req.body)
    var user_name=req.body.user;
    var password=req.body.password;
    console.log("User name = "+user_name+", password is "+password);
    res.end("yes");
  });
  app.listen(3000,function(){
    console.log("Started on PORT 3000");
  })
  </code></pre>
  
  <p>I set a console in post method function but it displayed:</p>
  
  <pre><code>{}
  User name = undefined, password is undefined
  </code></pre>
  
  <p>I couldn't get any data from response. I had lookup doc but I couldn't find any error. I don't still understand. What mistake did i make?</p>