So here is what I am trying to do. I want to save all HTTP (content + request + response) while I use google chrome. I found a way to use this with a network tool (in a developer tool) where I can download everything manually.
Now I want to automate this whole process, so I don’t need to do any manual thing. I thought we could do this by writing a simple Chrome extension using the API devtools.network.
chrome.devtools.network.onRequestFinished.addListener(
function(request) {
});
But I'm kind, lost here, I have not done development of Chrome Extension before. I made a simple file manifest.json:
{
"manifest_version": 2,
"name": "My extension",
"version" : "1.0",
"background": {
"scripts": ["devtools.js"],
"persistent": true
},
"devtools_page": "devtools.html",
"browser_action": {
"default_title": "Get it",
"default_icon" : "icon.png"
}
}
and pasted the first code snippet in devtools.js, but it gave me an error:
network not defined
Am I on the right track? If so, what am I doing wrong with my code?