-
-
Save BFinc/988e40d1217f22b57b96db7f82daa511 to your computer and use it in GitHub Desktop.
Example of using the JSONStream module
This file contains 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
var request = require('request') | |
var JSONStream = require('JSONStream') | |
var opts = { | |
url: 'https://api.github.com/users/watson/repos', | |
headers: {'User-Agent': 'request'} | |
} | |
request(opts) | |
.pipe(JSONStream.parse('*')) | |
.on('data', function (data) { | |
console.log(data) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment