How to use the postAsync function from request
Find comprehensive JavaScript request.postAsync code examples handpicked from public code repositorys.
100 101 102 103 104 105 106 107 108 109
}, //proxy: 'http://127.0.0.1:8888', strictSSL: false, jar: getTokenJar }; return request.postAsync(loginOption).then((res)=> { let token = {cookies: getTokenJar.getCookieString(baiduUri)}; this.setToken(token); return; });
61
157
21
+ 3 other calls in file
GitHub: maxpert/raspchat
2 3 4 5 6 7 8 9 10 11
const xhr = bluebird.promisifyAll(require('request')); const { ChatLog, GifCache } = require('./storage'); async function findGif(keywords) { const gifResp = await xhr.postAsync('https://rightgif.com/search/web', { form: { text: keywords } });
51
421
13
+ 5 other calls in file
29 30 31 32 33 34 35 36 37 38
} } catch (error) { return reject(error) } requestPromise.postAsync(options) .then(function (response) { return resolve(response) }) .catch(function (error) {
5
7
4
131 132 133 134 135 136 137 138 139 140
options: { filename: params.fileName, contentType: null } } } } return _Request.postAsync({ url: `${apiurl}/Breakdowns`, qs: params, headers: { "Content-Type": "multipart/form-data",
4
24
6
15 16 17 18 19 20 21 22 23 24
this.reqobj.url += '/'+sysid; return request.getAsync(this.reqobj).then(plogic); }; ImportSet.prototype.insert = function(obj) { this.reqobj.body = obj return request.postAsync(this.reqobj).then(plogic); }; return ImportSet;
12
17
3
GitHub: nicolaschan/bell
19 20 21 22 23 24 25 26 27 28
function register (url) { return async function () { const serverId = await getServerId() try { await request.postAsync(url, { json: true, form: { id: serverId, os: {
10
22
4
114 115 116 117 118 119 120 121 122 123
var Promise = require('bluebird'); var request = Promise.promisifyAll(require('request')); // create ajax function for sending requests var ajax = function(param) { return request.postAsync(param.url, { json: true, form: param.data, }).then(function(res) { return new Promise(function(resolve) {
5
28
16
GitHub: ubunteroz/smsbip
30 31 32 33 34 35 36 37 38 39
_get(props) { return request.getAsync(_.extend(this.props, props)); } _post(props) { return request.postAsync(_.extend(this.props, props)); } getBalance() { return this._get({
0
2
2
request.get is the most popular function in request (2246 examples)