git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
6e9c872
Branches
Tags
develop-client_server
master
typescript
fs-words.git
server
lib
node_modules
needle
examples
parsed-stream.js
[add] server:lib:node_modules
Christian Fraß
commited
6e9c872
at 2021-03-08 23:52:07
parsed-stream.js
Blame
History
Raw
////////////////////////////////////////// // This example demonstrates what happends // when you use the built-in JSON parser. ////////////////////////////////////////// var fs = require('fs'), stream = require('stream'), needle = require('./../'); var url = 'http://ip.jsontest.com/', resp = needle.get(url, { parse: true }); resp.on('readable', function(obj) { var chunk; while (chunk = this.read()) { console.log('root = ', chunk); } }); resp.on('done', function() { console.log('Done.'); });