Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parsed-stream.js 535B

1234567891011121314151617181920212223
  1. //////////////////////////////////////////
  2. // This example demonstrates what happends
  3. // when you use the built-in JSON parser.
  4. //////////////////////////////////////////
  5. var fs = require('fs'),
  6. stream = require('stream'),
  7. needle = require('./../');
  8. var url = 'http://ip.jsontest.com/',
  9. resp = needle.get(url, { parse: true });
  10. resp.on('readable', function(obj) {
  11. var chunk;
  12. while (chunk = this.read()) {
  13. console.log('root = ', chunk);
  14. }
  15. });
  16. resp.on('done', function() {
  17. console.log('Done.');
  18. });