title: Get the data from fetch -> promise -> response
body: <p>I am trying to post some data to the server but I don't know how to get back the response data.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>fetch(url, {
    method: 'POST',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      email: login,
      password: password,
    })
  }).then(function(a){
    console.log(a);
  })
  </code></pre>
  
  <p>It prints a <code>Response</code> it contains data such as body (ReadableByteStream), bodyUsed (false), ok (true), status (200),...
  but I cannot find the data I get back, nowhere. When I open the chrome developer console - network I see the response data there.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>I've been looking for some resources how fetch, promises,... work but I couldn't find any well written.</p>