Advertisement
cetax

nodehelpler.js

Jun 27th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.24 KB | None | 0 0
  1.  requestAsync: function(url) {
  2.     return new Promise(function (resolve, reject) {
  3.       request(url, function (err, res, body) {
  4.         if (err) { return reject(err); }
  5.         return resolve(JSON.parse(body));
  6.  
  7.       });
  8.     });
  9.   },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement