Skip to content

Logger for fetch (Work with any “fetch-compatible” function).

License

Notifications You must be signed in to change notification settings

Zlitus/fetch-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetch-logger

Logger for fetch (Work with any “fetch-compatible” function). fetch logger will try by default to use the module node-fetch, but it's not a dependancy: You can use any other “fetch-compatible” function. You can specify any function compatible with fetch in first argument of your first call of fetch logger. After that, fetch logger should remember what function you already used.

Image of fetch logger

Example

NodeJS example using the module node-fetch.

const fetch = require('fetch-logger');

fetch('http://127.0.0.1:8000', {headers: {'X-Hello': 'world'}}).then((result) => {
	console.log('Response retrieved!');
});

About

Logger for fetch (Work with any “fetch-compatible” function).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published