authentication-node-sample
authentication-node-sample copied to clipboard
Recommend removing the deprecated "request" package in favor of "node-fetch"
As of February the package "request" has been deprecated and will no longer be supported.
I would recommend switching to "node-fetch" which is more likely to be maintained and is, ultimately, a cleaner method for making the request.
const fetch = require('node-fetch');
fetch('https://api.twitch.tv/helix/users', options)
.then( response => response.json())
.then( data => {
// magic happens with the parsed response JSON
done();
});
It may seem a little silly to create an issue on something intended to be a sample but deprecated packages are not returned in search results on npmjs.com which could make searching for documentation difficult for those adapting the sample.
Very nice!