Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Envato API - HTTP Request - Node.js
var httpHelper = require('./helper/http');
var options = {
host: '',
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