How to use the request-promise.jar function in request-promise

To help you get started, we’ve selected a few request-promise 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 wobscale / EuIrcBot / modules / clojure / utils.js View on Github external
function addCookie(req, key, value) {
  const cookie = request.cookie(`${key}=${value}`);
  const jar = request.jar();
  jar.setCookie(cookie, req.uri.split('?')[0]);
  req.jar = jar;
  return req;
}
github JamaicanMoose / personalcapital-js / index.js View on Github external
return new Promise(function(resolve, reject) {
                fs.unlinkSync("pc-cookie.json");
                cookieJar = request.jar(new cookieStore('./pc-cookie.json'));
                this.csrf = null;
                resolve();
        });
}
github negezor / vk-io / middleware / OAuth.js View on Github external
constructor (setting) {
		this.setCookieJar(request.jar());
		this.setScope(setting.scope || fullScopes);

		for (var key of ['app','key','login','phone','pass','version','proxy']) {
			this[key] = setting[key] || null;
		}

		if (this.login === null) {
			this.login = this.phone;
		}

		this._capthaHandler = null;
		this._twoFactorHandler = null;
	}
github negezor / vk-io / auth / standalone.js View on Github external
constructor (vk) {
		this.vk = vk;

		this.jar = request.jar();

		this._captchaAttempts = 0;
	}

request-promise

The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.

ISC
Latest version published 4 years ago

Package Health Score

55 / 100
Full package analysis