I want to intercept the fetch API request and response in Javascript.
For ex: Before sending the request want to intercept the request URL and once get the respons
const fetch = window.fetch; window.fetch = (...args) => (async(args) => { var result = await fetch(...args); console.log(result); // intercept response here return result; })(args);