Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend removing the deprecated "request" package in favor of "node-fetch" #1

Open
bennyfits opened this issue Apr 6, 2020 · 1 comment

Comments

@bennyfits
Copy link

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.

@marcobrunodev
Copy link

Very nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants