• It's because you're parsing the data into JSON as it arrives. In Node.js it's arriving in one big chunk but in Espruino it's a few smaller ones.

    Do like it suggests here and do stuff on the close event, not the data one: http://www.espruino.com/Internet#client

    require("http").get("http://www.espruino­.com", function(res) {
      var contents = "";
      res.on('data', function(data) { contents += data; });
      res.on('close', function() {
       //  do JSON.parse(contents)
      });
    });
    
About

Avatar for Gordon @Gordon started