title: get request and response body from Chrome API onCompleted method
body: <p>How to record request and response body, chrome API <code>onCompleted</code> method is giving to record response header. How to do without opening developer tool?</p>
  
  <p>I am developing a Chrome extension where I should capture total request and response. Currently, for the response, I'm able to capture response headers alone, is there a way to capture the entire response body? I have looked all the Chrome APIs and include <code>onComplete</code> method it is giving the option to capture response header only. Also, I want to capture this response body without opening the developer tools.</p>
  
  <pre class="lang-js prettyprint-override"><code>function recordData() {
    chrome.webRequest.onCompleted.addListener(function(recordStatus) {
      console.log("Recording Data" + recordStatus);
    }, {
      urls: ["http://*/*", "https://*/*"]
    }, ["responseHeaders"]);
  }
  </code></pre>