modules

ac-bundle-module-api-luminati

api/luminati.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: requestCallback

requestCallback

async function(callback, errorCallback, type, url, method, data, headers) {
  if (!app.has(type)) type = "static";
  if (config.api.log.url) console.log(url);
  var proxyUrl = config.luminati.url[type];
  var result = await app.utils.proxy.fetch(proxyUrl, url, method, data, headers);
  var text = await result.text()
  if (result.status === 200) {
    if (typeof callback === "function") await callback(text);
  } else {
    if (typeof errorCallback === "function") await errorCallback("Could not load url " + url, text);
  }
}

Happy Coding!

Leave a Reply

Your email address will not be published. Required fields are marked *