• 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?

About

Avatar for Hansi @Hansi started