title: How to create a Response with Content-Type header?
body: <p>For testing <code>fetch</code> calls in a project, I do some mocking, intercepting requests and building my own <code>Response</code> object.</p>
  
  <p>As the returned data is JSON, I want to add the <code>Content-Type</code> header to the response, which is is checked on the client part, and <a href="https://developer.mozilla.org/en-US/docs/Web/API/Response/Response" rel="nofollow noreferrer">documented as valid on mozdev</a>, but in either Chrome or Firefox, the created <code>Response</code> has an empty <code>headers</code> property.</p>
  
  <pre class="lang-js prettyprint-override"><code>const response = new Response(myData, {
    status: 200,
    statusText: 'OK',
    headers: {
      'Content-Type': 'application/json'
    }
  }
  </code></pre>
  
  <p>Of course I also tried inserting a newly created <code>Headers</code> object. I got the same result.</p>
  
  <p><a href="https://i.stack.imgur.com/sRZas.png" rel="nofollow noreferrer">Here is the result on Chrome</a></p>
  
  <p>I did I do wrong?</p>