Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save m4munib/43ce66ee24719c1a388f078176e6810b to your computer and use it in GitHub Desktop.
Save m4munib/43ce66ee24719c1a388f078176e6810b to your computer and use it in GitHub Desktop.
Envato API - HTTP Request - Node.js
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