Questions tagged [request-promise]

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

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

Resources

Also check out the new libraries that are very similar to request-promise v4:

363 questions
0
votes
1 answer

Parallel scraping with Cherio

I am trying to scrape a website with multiple section and pagination in parallel. The idea is to go through each section per page. For instance if there are 6 sections and each section has 6 items per page (total page is up to 10), then I would…
abiieez
  • 3,139
  • 14
  • 57
  • 110
0
votes
1 answer

NodeJS Cheerio library pagination web scraping

i hope you well in this situation. Am has question about web scraping (paginate) with nodejs and library cheerio. has some code done but there is trouble it only scrape one page, am already searching for solutions few hours, try to follow some steps…
William
  • 13
  • 1
  • 4
0
votes
2 answers

break a loop of request-promise

I'm looping over this url /api?id=1&page= every time requesting a different page until i get the result i want. I can't figure out how and why i can't stop the loop from within the request. async something() { let results = [] for (let i =…
0
votes
0 answers

why the result of uploader is error but never goes in .catch in requestPromise

this is my test file for upload and i explain it step by step: I wrote a test to upload the file. the uploader method written with busboy module and it working true but i have problem in test. when result of uploader is error, this error never…
mrbelane
  • 175
  • 1
  • 1
  • 7
0
votes
0 answers

Post login request with request-promise does'nt work http request

Hello I have a problem with request-promise. I try to navigate on a website with http request I try this code. const rp = require('request-promise'); const userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like…
0
votes
2 answers

NodeJS function that returns resolved promise value instead of the promise?

I have a function that uses the request-promise module to scrape and parse HTML from a website. I want the function to just return some JSON data when it's done, and not a promise. Here's the slimmed down version of the code I have so far: const rp…
0
votes
1 answer

Can I use request-promise within an html page?

Is it possible to use request promise like this? if so - what is the correct way to set this up? Would I be able to make a get request to a different domain? I simply need to make a get request to another domain from my webpage - what would be the…
makat
  • 154
  • 1
  • 3
  • 14
0
votes
1 answer

Promise resolves after awaited but data is undefined

JavaScript gurus, what am I missing here? Simple test scenario as follows: import * as request from "request-promise-native"; export class Publisher { name : string = "IRocking Publisher"; async publishAsync():…
Klaus Nji
  • 18,107
  • 29
  • 105
  • 185
0
votes
2 answers

How to scrape a table with changing data using Cheerio in Node.js?

I am trying to scrape data from a table in a website which has constantly changing values. So each row can vary day to day but I want to be able to scrape the correct data. I am using the Cheerio library at the moment and I am not familiar with it…
0
votes
1 answer

Write After End Error when Reading a File using FS

I built a program where a user can send request with a PDF URL then sever download it and forward into an external API endpoint. Now, the code able to download file but it hit this error when it start to read the file. I must admit that Promises is…
user12360954
0
votes
1 answer

download large files and continue uploading to minio with nodejs, KILLED MY SERVICE?

I have an API built with NodeJS, in that API there is a process where I download a large file using modules request-promise and then it is made a new buffer uploaded to minio. But I have a problem that my API always crashes if the file is above…
Aminudin
  • 109
  • 2
  • 8
0
votes
1 answer

Nested Promises? How to access value in a returned promise?

This code is from a React app. The makeCall function was provided in a Twitch extension example project. I'm using it to call the backend server for my extension. makeCall(url, method="GET"){ return new Promise((resolve, reject)=>{ …
Nick H
  • 217
  • 4
  • 19
0
votes
1 answer

Azure function app ETIMEDOUT error works sometimes but not others

I have the below code: var request = require('request'); var rp = require('request-promise'); module.exports = async function(context, req) { var arr = [[url1],[url2]] for (i = 0; i < arr.length; i++) { func(context, arr[i]); …
JDT
  • 965
  • 2
  • 8
  • 20
0
votes
1 answer

How to make a series of parallel(asynchronous) API requests with dynamic URLs in Node JS

How to call HTTP requests asynchronously in Node JS. I have 3 major challenges as below. Requires to call asynchronously. Request URL is dynamic. Avoid using loops. The below method is used to call single endpoint. const options = { method:…
Harsha W
  • 3,162
  • 5
  • 43
  • 77
0
votes
2 answers

Not able to access the values from request-promise response

I have a below code which is giving me response but when i try to access properties of the response, i am getting 'undefined' const request = require('request-promise'); const option= { method: 'GET', uri: 'urihere', qs: { q: 'Mark' }, json:…
Lara
  • 2,821
  • 7
  • 39
  • 72