I'm trying to intercept the responses from all of the network requests of the user's browser.
I used chrome.webRequest.onResponseStarted
and got the response headers,
but I don't know how to get the full response body.
I'd be happy if you could help me understand how to do so.
this is my manifest.json
{
"manifest_version": 2,
"name": "tempName",
"description": "Temp description",
"version": "1.0",
"icons": {
"16": "/images/icon-16.png",
"48": "/images/icon-48.png",
"128": "/images/icon-128.png"
},
"background": {
"scripts": ["background.js"]
},
"page_action": {
"default_icon": {
"16": "/images/icon-16.png",
"48": "/images/icon-48.png",
"128": "/images/icon-128.png"
}
},
"permissions": [
"webRequest",
"webRequestBlocking",
"<all_urls>"
]
}
and this is my background.js
chrome.webRequest.onResponseStarted.addListener(function (e) {
console.log(e);
}, {
urls: ["<all_urls>"],
});