Request example NODEJS

You jsut need to pick a library that makes cURL requests and away you go.

If using Got, (incomplete sample)

got(
    'https://api.twitch.tv/helix/users??id=44322889',
    {
        headers: {
            'Content-Type': 'application/json',
            'Client-ID': client_id
        },
        gzip: true
    }
)
.then(resp => {
    console.log(resp.body);

Got is documented here

1 Like