Last active
December 12, 2017 07:30
-
-
Save emrahdk/230077c781fb962b66a6061c452927f1 to your computer and use it in GitHub Desktop.
Log Fetch requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fetch logger | |
global._fetch = fetch; | |
global.fetch = function(uri, options, ...args) { | |
return global._fetch(uri, options, ...args).then((response) => { | |
console.info('🚀', { request: { uri, options, ...args }, response }); | |
return response; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment