Created
August 22, 2016 17:06
-
-
Save mosampaio/bd9d9be05df97794c3077df559885df3 to your computer and use it in GitHub Desktop.
How to consume a json Rest API with Node.js using Unirest
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
// Remember to install the dependency> npm install unirest | |
const unirest = require('unirest'); | |
unirest.get('https://api.github.com/repos/twilio/twilio-node/contributors') | |
.headers({'user-agent': 'My App'}) | |
.end((response) => { | |
console.log(response.body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment