title: chrome.devtools.network.onRequestFinished - console.log not executed
body: <p>I have this code to create a devtools panel in a chrome extension. For learning proupose I want to inspect network requests of a certain website and get the body of them.</p>
  <pre><code>chrome.devtools.panels.create('Spotify test', '', '/index.html');
  
  chrome.devtools.network.onRequestFinished.addListener( (request) =&gt; {
    //console.log(request);
    if(request.method === 'GET' &amp;&amp; request.response.status === '206' ){
      console.log(request);
      request.getContent( (content, encoding) =&gt; {
        console.log(content, encoding);
      });
    }
  });
  </code></pre>
  <p>The problem is that the <code>if(request.method === 'GET' &amp;&amp; request.response.status === '206' )</code> will not be executed, I'm able to log the request object of the callback only if I put it outside the statement. I want to log only requests that are using the <code>GET</code> method and that have the <code>206</code> status code. As I read in the documentation, on the request object I can use the <code>getContent()</code> method to get the body of the response, is this right? Is there any error in the code that will prevent to the <code>console.log()</code> to be fired?</p>
  <p>NB: I'm using the devtools console that is opened by clicking the inspect menu voice inside the panel I've added.</p>