code: function ajax(url, callback, data) {
    if (data) {
      request.post({url: url, body: data, json: true}, function(err, res, body) {
        if (err) console.log(err);
        callback(err, body, res);
      });
    } else {
      request(url, function(err, res, body) {
        if (err) console.log(err);
        callback(err, body, res);
      });
    }
  }
docs: https://gist.github.com/Xeoncross/7663273