Sha256: ab16203d93795a9d263c24b0caf9578fa024b8a21e58dc20158eb7803a5eb2b2

Contents?: true

Size: 381 Bytes

Versions: 7

Compression:

Stored size: 381 Bytes

Contents

var http = require('../../');
var JSONStream = require('JSONStream');

http.get({ path : '/data.json' }, function (res) {
    var parser = JSONStream.parse([ true ]);
    res.pipe(parser);
    
    parser.on('data', function (msg) {
        var div = document.createElement('div');
        div.textContent = JSON.stringify(msg);
        document.body.appendChild(div);
    });
});

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
snowball-0.1.22 node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/main.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/main.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/main.js
sprockets-browserify-0.1.2 node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js
sprockets-browserify-0.1.0 node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js