Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- var originalFetch = fetch;
- fetch = function () {
- return originalFetch.apply(this, arguments)
- .then(function (responseOriginal) {
- var responseClose = responseOriginal.clone();
- responseClose.json().then(function (data) {
- console.log('==> data:', data);
- console.log('==> url:', responseOriginal.url);
- // TODO: work with data ...
- });
- return responseOriginal;
- })
- };
- })();
Add Comment
Please, Sign In to add comment