BeataKr / axios-har-tracker

This library was designed for gathering HAR files from requests sent using axios
https://github.com/BeataKr/axios-har-tracker
10 stars 10 forks source link

Only captures some request headers #5

Closed davecardwell closed 1 year ago

davecardwell commented 2 years ago

@BeataKr Thank you for publishing this library - it has been a huge help!

I noticed that it only captures the common request headers: https://github.com/BeataKr/axios-har-tracker/blob/a2015d1a1735bf928afadf28e87eee97ad71aa47/src/axios-har-tracker.ts#L91

Please could you tell me if this is a deliberate design choice or just an oversight? I would be very interested in either having an option to capture all request headers, or that being the default behavior. I thought I’d best check first what the rationale for the current design was.

BeataKr commented 2 years ago

Hi @davecardwell, thank you for pointing this out. Basically, I tried to create a har file similar to this exported by Chrome (so maybe my bad that I focused only on common). I can take it as a feature of my package. If you have time, feel free to contribute. I can't promise that I can do that soon, but I'll try ;-)

bewest commented 1 year ago

Pull request for this: https://github.com/BeataKr/axios-har-tracker/pull/8