3 ms·
As a follow up, the algorithm that powers this makes use of the chrome.devtools.network API. Specifically it passes the Request object that is in the HAR 1.2 ar
by mrmagoo2 3y ago
As a follow up, the algorithm that powers this makes use of the chrome.devtools.network API. Specifically it passes the Request object that is in the HAR 1.2 archive format.
So if you can pass the equivalent of that in Firefox/other browsers to the insert method and switch things up a bit, it should be relatively straightforward. I will think about pulling out the core logic into its own lib.
https://developer.chrome.com/docs/extensions/reference/devtools_network/ https://developer.chrome.com/docs/extensions/reference/devto...
https://developer.chrome.com/docs/extensions/reference/devtools_network/#type-Request https://developer.chrome.com/docs/extensions/reference/devto...
https://github.com/AndrewWalsh/openapi-devtools/blob/main/src/lib/RequestStore.ts#L48 https://github.com/AndrewWalsh/openapi-devtools/blob/main/sr...
- a_c 3y agoIndeed I have issue here. Firefox maintain a library for unified extension API https://github.com/mozilla/webextension-polyfill https://github.com/mozilla/webextension-polyfill Their type definition for HAR request isn't exported https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/webextension-polyfill/namespaces/devtools_network.d.ts#L22 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast... So I can't drop in replace the type on https://github.com/AndrewWalsh/openapi-devtools/blob/main/src/lib/RequestStore.ts#L48 https://github.com/AndrewWalsh/openapi-devtools/blob/main/sr...
- a_c 3y agoAlso the polyfill has a promise based API rather than a callback, which I don't yet know if there is a workaround