title: TypeError: Failed to fetch
body: <p>I have a index.pug file, that is render by GET, and Post that returns data into json.</p>
  
  <pre><code>router.get('/', function(req, res, next) {
    res.render('index', { title: 'agrotaxi' });
  });
  
  router.post('/', async function(req, res) {
  ......
  res.json(info);
  });
  </code></pre>
  
  <p>The problem is that when you try to fetch the result i've got:</p>
  
  <pre><code>Uncaught (in promise) TypeError: Failed to fetch
  </code></pre>
  
  <p>my fetch function: </p>
  
  <pre><code>   document.getElementById('go').addEventListener('click',getdata);
  
     function getdata() {
  
         let start = document.getElementById('start').value;
         let end = document.getElementById('end').value;
  
         let options = {
             "start": start,
             "end": end
         };
         fetch('http://localhost:3000', {
             method: 'post',
             headers: {
                 "Content-type": "application/json; charset=UTF-8"
             },
             body:JSON.stringify(options)
         })
         .then(function(res){
             return res.json(); //error here
         })
         .then(function(data){
             console.log(data);
         });
     }
  </code></pre>
  
  <p>Don't understand what i do wrong.
  <a href="https://i.stack.imgur.com/FYQPc.png" rel="nofollow noreferrer" title="error">the pic of error</a></p>