Is it possible to log HTTP responses on a domain using javascript? I know this is possible using the developer console, but I'm looking for a way to log the incoming traffic on a webpage with js only
Asked
Active
Viewed 23 times
0
-
Oh darn. I found a way to listen to websocket traffic that works but im not sure if it could be edited for my purposes `WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, { }}); ` Could this be repurposed for http traffic? using new Proxy() – Shungite Sep 28 '22 at 15:56
-
Yes, using the [service worker API](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API). – jsejcksn Sep 28 '22 at 16:29