How to use the getAsync function from request

Find comprehensive JavaScript request.getAsync code examples handpicked from public code repositorys.

42
43
44
45
46
47
48
49
50
51
    },
    //proxy: 'http://127.0.0.1:8888',
    jar: getTokenJar,
    strictSSL: false
};
return request.getAsync(getTokenOption).then((res)=> {
    let token = null;

    function callbackFromBaidu(result) {
        token = result.data.token;
fork icon61
star icon157
watch icon21

+ 5 other calls in file

57
58
59
60
61
62
63
64
65
66
    'accept': 'application/zip'
  },
  encoding: null
}

requestPromise.getAsync(options)
  .then(function (response) {
    return resolve(response)
  })
  .catch(function (error) {
fork icon5
star icon7
watch icon4

7
8
9
10
11
12
13
14
15
16
var Vindexer = function(apikey) { 
    this.apiKey = apikey;
}

Vindexer.prototype.getAccounts = function() {
    return _Request.getAsync({
        url: `${apiurl}/Accounts`,
        headers: { "Ocp-Apim-Subscription-Key": this.apiKey }
    })
}
fork icon4
star icon24
watch icon6

+ 17 other calls in file

11
12
13
14
15
16
17
18
19
20
    }
    this.reqobj = new req(instance, tablename, user, password);
}
ImportSet.prototype.get = function(sysid) {
    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);
fork icon12
star icon17
watch icon3

87
88
89
90
91
92
93
94
95
96
}
url += data[locale].version;
const backup = _.cloneDeep(data);
const __ = I18nService.getPluginI18n();
try {
    const responses = await request.getAsync(url);
    let responseBody = {};
    const response = responses;
    if (_.isArray(responses)) {
        responseBody = responses[1];
fork icon10
star icon9
watch icon7

+ 7 other calls in file

26
27
28
29
30
31
32
33
34
35
        }
    }
}

_get(props) {
    return request.getAsync(_.extend(this.props, props));
}

_post(props) {
    return request.postAsync(_.extend(this.props, props));
fork icon0
star icon2
watch icon2