Tabnine Logo For Javascript
rp
Code IndexAdd Tabnine to your IDE (free)

How to use
rp
function
in
request

Best JavaScript code snippets using request.rp(Showing top 15 results out of 693)

origin: cteamx/Thief

getAd(callback) {
    rp(url)
      .then(function(result) {
        callback(result)
      })
      .catch(function(err) {
        callback("err")
      });
  }
origin: cube-js/cube.js

async cloudReq(options) {
  const { url, auth, ...restOptions } = options;
  const authorization = auth || this.preLoadDeployAuth;
  if (!authorization) {
   throw new Error('Auth isn\'t set');
  }
  return rp({
   headers: {
    authorization: authorization.auth
   },
   ...restOptions,
   url: `${authorization.url}/${url(authorization.deploymentId)}`,
   json: true
  });
 }
origin: tumobi/nideshop

const requestResult = await rp(sendOptions);
if (think.isEmpty(requestResult)) {
 return expressInfo;
origin: cteamx/Thief

getData(code, callback) {
    var codeArr = code.split(",");

    var textAll = "";

    var promiseArr = codeArr.map(function (code) {
      return rp(url + code);
    });

    Promise
      .all(promiseArr)
      .then(function (results) {
        for (let index = 0; index < results.length; index++) {
          var arr = results[index].toString().split(",")
          var yesterday_price = parseFloat(arr[2]);
          var curr_price = parseFloat(arr[3]);
          var percentage = (curr_price - yesterday_price) / yesterday_price * 100
          var text = curr_price.toFixed(2) + "," + percentage.toFixed(2) + "%";
          textAll = textAll + text + "||";
        }
        textAll = textAll.substring(0, textAll.length - 2)
        callback(textAll)
      })
      .catch(function (e) {
      });
  }
origin: tumobi/nideshop

let sessionData = await rp(options);
sessionData = JSON.parse(sessionData);
if (!sessionData.openid) {
origin: Ryzzzen/manaflux

async _scrape(champion, position, gameMode) {
  const data = await rp({ uri: `${this.base}/overview/${champion.key}${position ? '/' + position : ''}/${gameMode === 'ARAM' ? 'aram' : ''}`.toLowerCase(), transform: body => cheerio.load(body) });

  const perks = this.scrapePerks(data, position);

  const itemsets = Mana.getStore().get('item-sets-enable') ? this.scrapeItemSets(data, champion, position, this.scrapeSkillOrder(data)) : [];
  const summonerspells = Mana.getStore().get('summoner-spells') ? this.scrapeSummonerSpells(data, champion) : [];
  const statistics = Mana.getStore().get('statistics') ? {} : {};

  return { perks, itemsets, summonerspells, statistics, gameMode };
 }
origin: odeddoek/MySeries

showRepository.addUserTvShow(context.session.name, args.id).then(function (result) {
              return rp("http://api.tvmaze.com/shows/" + args.id)
                .then(function (res) { return JSON.parse(res); });
            }, function (err) {
              console.log("err", err);
            })
origin: blogwy/BilibiliVideoDownload

const isMore = async aid => {
 let res = await rp(`http://api.bilibili.com/view?type=jsonp&appkey=8e9fc618fbd41e28&id=${aid}&page=2`);
 return {
  cid: JSON.parse(res).cid,
  title: JSON.parse(res).title
 }
}
origin: marvinpinto/ledger-reconciler

// istanbul ignore next
 async prestocardGetRequest(args) {
  await this.sleep(100);
  const defaultArgs = {
   method: 'GET',
   uri: args.uri,
   jar: this.cookieJar,
   resolveWithFullResponse: true,
  };
  const result = await rp(defaultArgs);
  return result.body;
 }
origin: jwplayer/jwplatform-node

_fetch(url, method, data) {
    return rp({
      method,
      uri: `${this.baseUrl}${url}`,
      headers: this.headers,
      json: true,
      body: data,
    });
  }
origin: Ryzzzen/manaflux

async getSession() {
  return await rp({
   method: 'GET',
   uri: Mana.base + 'lol-champ-select/v1/session',
   resolveWithFullResponse: true,
   json: true
  });
 }
origin: chiefy/vaulted

rp(options).then(function (data) {
  return data.ID;
 }).catch(function (err) {
  debuglog('createConsulToken failed: ', err);
  return null;
 })
origin: onnobos/hashtagmania

function LoadFileFromTelegram(file_path, uri) {
 return rp({
  method: 'GET',
  uri: uri+file_path,
  encoding: null,
  resolveWithFullResponse: true
 });
}
origin: Ryzzzen/manaflux

constructor(devMode) {
  super('flux', 'Flu.x');
  this.base = 'https://manaflux-server.herokuapp.com/';

  if (devMode) rp('http://localhost:8920/').then(() => this.base = 'http://localhost:8920/').catch(() => console.log('[Flu.x] Local server is unavailable.'));
 }
origin: Ryzzzen/manaflux

async setCurrentPage(id) {
  return await rp({
   method: 'PUT',
   uri: Mana.base + 'lol-perks/v1/currentpage',
   body: { id },
   json: true
  });
 }
request(npm)rp

Most used request functions

  • request
  • Response.statusCode
  • RequestAPI.post
  • RequestAPI.get
  • Request.pipe
  • Request.on,
  • Response.headers,
  • RequestAPI.defaults,
  • RequestAPI.put,
  • RequestAPI.jar,
  • Response.statusMessage,
  • RequestAPI.head,
  • Response.on,
  • RequestAPI.cookie,
  • RequestAPI.delete,
  • Response.pipe,
  • RequestAPI.del,
  • requestRetry

Popular in JavaScript

  • crypto
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • body-parser
    Node.js body parsing middleware
  • semver
    The semantic version parser used by npm.
  • fs
  • async
    Higher-order functions and common patterns for asynchronous code
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • axios
    Promise based HTTP client for the browser and node.js
  • lodash
    Lodash modular utilities.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now