code: function ajax(url, callback, data) {
    if (data) {
      var reqOptions = typeof url === 'string' ? { uri: url, body: data, json: true } : _extends({}, url, { body: data, json: true });
      _request2.default.post(reqOptions, function (err, res, body) {
        if (err) console.log(err);
        callback(err, body, res);
      });
    } else {
      (0, _request2.default)(url, function (err, res, body) {
        if (err) console.log(err);
        callback(err, body, res);
      });
    }
  }
docs: https://gist.github.com/Xeoncross/7663273