title: "Uncaught (in promise) SyntaxError: Unexpected end of input" using fetch from Chrome
body: <p>Objective: provide some basic data from Express JS to browser requests, all running locally on localhost.</p>
  <p>When I connect to the URL (http://localhost/test) with the browser directly I see the data I'm trying to receive in the browser window.  However, when I execute the following code in a  tag in an HTML document I get &quot;Uncaught (in promise) SyntaxError: Unexpected end of input&quot; and no data retrieved.</p>
  <pre><code>        fetch('http://localhost/test', {
          'content-type': 'application/json',
          mode: 'no-cors',
          method: 'GET',
          redirect: 'follow'
      })
          .then(response =&gt; response.json())
          .then(json =&gt; console.log(json))
  </code></pre>
  <p>Here's my Express code:</p>
  <pre><code>    app.get(&quot;/test&quot;, (req, res) =&gt; {
          res.header(
              &quot;Access-Control-Allow-Origin&quot;,&quot;http://localhost:*&quot;
          )
          res.json( {username: 'Joe'})
      });
  </code></pre>
  <p>I started without the &quot;res.header&quot; above but after many searches found that as a suggestion.  CURL and XMLHttpRequest both work fine.</p>