How can I listen to all requests?

I am trying to create an extension that will intercept all requests that were made on the webpage. How can I do this?
4 Replies
Yintii
Yintii•11mo ago
A content script will be injected to each webpage from your extension, but this is general. It will be injected to every page, and you can intercept requests by overriding the fetch function if you really need to. What is it for exactly?
Arcane
Arcane•11mo ago
@Yintii has reached level 2. GG!
Yintii
Yintii•11mo ago
Actually, it would process on the server first before getting to the client no matter what, so you’d need a proxy server that your plugin uses between the actual server most likely
filthytone
filthytone•11mo ago
you can use chrome.webRequest api to listen for a variety of network-related events
Want results from more Discord servers?
Add your server