Created
May 30, 2016 21:55
-
-
Save m4munib/43ce66ee24719c1a388f078176e6810b to your computer and use it in GitHub Desktop.
Envato API - HTTP Request - Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpHelper = require('./helper/http'); | |
var options = { | |
host: 'marketplace.envato.com', | |
path: '/api/edge/number-of-files:themeforest.json', | |
method: "GET", | |
headers: {'user-agent': 'Node.js - Envato API Consumer'} | |
}; | |
httpHelper.request(options, function (body) { | |
var items = JSON.parse(body); | |
console.log(items); //prints JSON string | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment