I am trying to build a chrome extension. An important part of the extension is to find out how large the request/response body of network requests is (this should include http request from video streams).
I am not sure what i am doing wrong but some solutions i tried either dont have the response body or the response header "Content-size" value does not correspond with the actual size of the asset.
Currently this is a snippet of my code
var requestFilter ={
urls:[
"<all_urls>"
]
};
let extraInfoSec=[
"responseHeaders"
]
chrome.webRequest.onCompleted.addListener(function (request) {
console.log(request, "WEB REQUEST")
},requestFilter,extraInfoSec)
i was hoping i could get the size of every request/response happening on the page, i don't care about the response content