0

for my daily work I have to look a lot at network requests made by the browser and for a long while I used firebug to do that. Firebug had a really cool at pleasent and clean way to show XHR requests in the console. The Firebug DevTools do not offer that same clear GUI and it is a lot of scrolling. The chrome devtools are better but also do not offer the same sort of firebug convenience.

So I want to write a extension for that myself to perfectly suit my needs but so far I am a little bit confused about the API reference that I found. https://developer.chrome.com/extensions/devtools_network#method-getHAR

Maybe I am bit spoiled from C++ API references but that can't be the whole documentation of that API?

According to that page the whole network API consists of three functions? I mean where has to be more somewhere but I was not able to found it on the google page hopefully somebody can point the way or enlighten me about that.

For example I added a chrome.devtools.network.onRequestFinished.addListener which gives me request object but I was only able to get the body of the request how do you get the header information?

On that same page is a link to: http://www.softwareishard.com/blog/har-12-spec/#request and I thought: "Ok maybe that is the full documentation but it is only a blog post and the request object has as far as I can tell no request.headers variable.

I hope somebody can point the way.

Regards Ruvi

Ruvi
  • 253
  • 4
  • 15
  • Use an official [demo extension](https://developer.chrome.com/extensions/samples#search:gethar) and work up from there. You can also check other extensions' code. As for HAR, it is a standard thing for which you can find specification and additional examples. – wOxxOm Jan 14 '18 at 15:44
  • Really? I have to debug demo examples to find out which api functions exist? I looked for HAR specifics but the request object in chrome.devtools.network as far as I can tell has no headers parameter. – Ruvi Jan 14 '18 at 15:46
  • The demo simply shows how to use the API, the documentation is complete. – wOxxOm Jan 14 '18 at 15:51

0 Answers0