Finally it works in node.js
var https = require('https'); var options = { host: 'openapi.etsy.com', path: '/v2/shops/shopID?method=GET&api_key=api-key=num_favorers', headers: {'user-agent': 'Mozilla/5.0'} }; https.get(options, function(res) { console.log("Got response: " + res.statusCode); var dataQueue = ""; res.on('data', function(d) { //process.stdout.write(d); dataQueue += d; console.log(dataQueue); myObj = JSON.parse(dataQueue); console.log(myObj.results[0].num_favorers) }); //res.on('end', function(){ //console.log(dataQueue); //}); }).on('error', function(e) { console.log("Got error: " + e.message); });
but it is Https - there is no support of Https?
@Hansi started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Finally it works in node.js
but it is Https - there is no support of Https?