Skip to content

Instantly share code, notes, and snippets.

@jaylandro
Created September 24, 2018 21:18
Show Gist options
  • Save jaylandro/e021165ab42dd021dd3c371473a9a70a to your computer and use it in GitHub Desktop.
Save jaylandro/e021165ab42dd021dd3c371473a9a70a to your computer and use it in GitHub Desktop.
Follow sample append
const request = require('request');
const fs = require('fs');
request('https://api.github.com/users/jaylandro/followers', {headers: {
'Accept': 'application/json',
'Accept-Charset': 'utf-8',
'User-Agent': 'my-app'
}}, (err, res, body) => {
if (err) { return console.log(err); }
fs.appendFile('people.txt', body, function (err) {
if (err) throw err;
console.log('Saved!');
console.log(body);
// console.log(body.explanation);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment