title: Client print 'Undefined' messag when i send json info from the server
body: <p>When I click "ajaxsend" button, the result shows "undefined" on the console.</p>
  
  <p>how can I check that function res.json is working fine?</p>
  
  <p>app.js</p>
  
  <pre><code>var express = require('express')
  var app = express()
  var bodyParser = require('body-parser')
  
  app.listen(3000, function() {
  console.log("start!! express server on port 3000");
  });
  
  app.use(express.static('public'))
  app.use(bodyParser.json())
  app.use(bodyParser.urlencoded({extended:true}))
  app.set('view engine', 'ejs')
  
  app.post ('/ajax_send_email', function(req, res){
  console.log(req.body.email)
  var responseData = {'result':'ok','email':req.body.email}
  console.log(responseData)
  res.json(responseData)
  });
  </code></pre>
  
  <p>form.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="uft-8"&gt;
      &lt;title&gt;email form&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;form action="/email_post" method="post"&gt;
        email : &lt;input type="text" name="email"&gt;&lt;br/&gt;
        submit &lt;input type="submit"&gt;
      &lt;/form&gt;
      &lt;button class="ajaxsend"&gt;ajaxsend&lt;/button&gt;
  
      &lt;div class="result"&gt;&lt;/div&gt;
  
      &lt;script&gt;
        document.querySelector('.ajaxsend').addEventListener('click',function(){
          var inputdata = document.forms[0].elements[0].value;
          sendAjax('http://127.0.0.1:3000/ajax_send_email',inputdata);
        })
  
        function sendAjax(url, data){
          var data = {'email' : data};
          data = JSON.stringify(data);
  
          var xhr = new XMLHttpRequest();
          xhr.open('POST', url);
          xhr.setRequestHeader('Content-Type', "application/json");
          xhr.send(data);
  
          xhr.addEventListener('load', function() {
            console.log(xhr.reponseText);
          });
        }
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I expect console shows "{result:ok, email:content in input text "email"}
  but the actual output is "undefined".</p>