I am making a nodejs pupeteer app that loads a web page. In that page, many resources are loaded. The pupeteer API for intercepting requets/response seems to not work for all resources, so I want to use an http proxy.
I want to intercept a particular request/response in my proxy. If the remote server sends back a response with the first line of the content being the word "cat", then I want to console.log that resource URL before I forward the response back to the client. The request may use https. How can I achieve something like that?