How to use the needle.getAsync function in needle

To help you get started, we’ve selected a few needle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github qjroberts / xenforo-scraper / xf-scraper.js View on Github external
XFPage.prototype.load = function load() {
  var url = this.url;

  // Add the page slug for subsequent pages (page 1 doesn't have a slug)
  if (this.page > 1) {
    url += 'page-' + this.page;
  }

  // Fetch the page
  return needle.getAsync(url, this.clientOpts)
    .then(this._onLoad.bind(this));
};
github cocos-creator / firedoc / lib / builder-new.js View on Github external
return current.then(function () {
          debug('fetching ' + item);
          return request.getAsync(item, {});
        }).then(function (results) {
          var data = JSON.parse(results[1]);
github cocos-creator / firedoc / lib / builder.js View on Github external
return current.then(function () {
          debug('fetching ' + item);
          return request.getAsync(item, {});
        }).then(function (results) {
          var data = JSON.parse(results[1]);

needle

The leanest and most handsome HTTP client in the Nodelands.

MIT
Latest version published 3 months ago

Package Health Score

83 / 100
Full package analysis