By default Fetch API does not offer support for interceptors, but you can monkey patch it. Monkey patching is an approach that overrides the original functionality with your version of the function
const originalFetch = window.fetch;
window.fetch = function(url, options) {
// Your code goes here...
return originalFetch(url, options);
};
Checkout the index.html
file on how to add interceptors to Fetch API