I can view the requests in browser web tools, but I want a certain action to be triggered whenever a request is made.
Let's say I have this javascript function defined:
function trace(url, headers, body) {
...
}
Can I register this function to be triggered whenever a network request is made.