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
2 answers

Using Promises in a loop

I try to create a loading test script but I faced with weird behaviour I use https://github.com/prisma-labs/graphql-request module for graphql request. But I don't see that the process run into the callback I see the next result. It stoped on the 5…
Vlad
  • 25
  • 5
0
votes
1 answer

Node promise request works locally but not on lambda

For some reason, the script that I am running locally does not work when uploaded to aws lambda. What's weird is that I neither get an error message nor a result. The request simply seems to get stuck and times out. const request =…
user2161301
  • 674
  • 9
  • 22
0
votes
1 answer

Vuejs-Download File migration from Promise-Request to Axios- First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object

In my vuejs 2 application, I am trying to migrate to axios. the code worked using Request-Promise, but now I get this error: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object --------> file1.ts /////////////// import…
Amir Choubani
  • 829
  • 2
  • 14
  • 28
0
votes
1 answer

how to resolve the javascipt code using cheerio data-scraping

I have watched the video on youtube then I want to practice the code in a different way. I want to extract the data from imdbdata website then how to resolve the issue JS code. Getting data from IMDB website const option = { uri:…
Malik
  • 1
  • 1
0
votes
1 answer

Nodejs unable to request url with request-promise

I am unable to fetch https from the OpenTable website using the following code. However, when I try to fetch data from other sites e.g. Instagram using the same code, it works. As I just started learning web scraping with node js, could you let me…
Christopher
  • 57
  • 1
  • 5
0
votes
2 answers

Send Puppeteer Generated Pdf to another microservice using requestPromise npm

I have two microservices: 1) in which I am generating pdf using Puppeteer, which is essentially a Buffer object. From this service I want to send the pdf to another microservice, 2) which receives the pdf in request and attaches it in email using…
Rajan Shah
  • 95
  • 1
  • 2
  • 10
0
votes
1 answer

On the post method how to gets a list of display properties

Example POST URL (with display properties): https://api.hubapi.com/crm-objects/v1/objects/line_items/batch-read?hapikey=demo&properties=name&properties=quantity&properties=price Example POST BODY: { "ids": [ 9845651, 9867373 ] } Node…
shamim
  • 6,640
  • 20
  • 85
  • 151
0
votes
0 answers

Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in request nodejs

this is my code: const request = require('request'); const options = { url: 'https://api.github.com/', headers: { 'User-Agent': 'request', 'Access-Control-Allow-Origin':'*', }, }; request(options, (error,…
0
votes
1 answer

Need help to understand how to resolve a promise that is nested within multiple mongoose queries and a mapped array

router.get('/pictures', (req, res, next) => { Picture.find() .then(handle404) .then(pictures => { return pictures.map(picture => picture.toObject()) }) .then(pictures => { pictures.map(picture => { …
Colleen
  • 48
  • 7
0
votes
0 answers

GET request works in Postman but not in NodeJS using request package

I've been trying to migrate a simple web scraping script to NodeJS using request-promise package but I'm always getting the following error as output 403 This IP has been automatically blocked However, if I use my browser or Postman to trigger the…
WSD
  • 3,243
  • 26
  • 38
0
votes
0 answers

Getting error using request-promise-native or axios in Dialogflow fulfillment inline editor

I am trying to use Request-Promise-Native or Axios but getting error during execution. I am sharing my code. I am using dialogflow inline editior. I also try with post api but not working. I guess somewhere i am doing minor mistake. Please explain…
0
votes
1 answer

Possible leak in React.js axios fetching data and state update

Everything is working with my cde but I have some very strange behavior that I cannot figure out. My returned promises start off with 1 or 1 and slowly get larger until after about 5 minutes it has over dozens of them. I am using this code... …
Justin Oberle
  • 502
  • 3
  • 22
0
votes
2 answers

How to await values being added to array?

I have a project where I am parsing a fast-food menu using Request-Promise and Cheerio, then returning an "order" based on what a user asks for. However, I am having some trouble outputting the "order" which I am storing as an array. var rp =…
Jacob
  • 346
  • 3
  • 13
0
votes
0 answers

undefined "Failed to fetch"

I am using node with express and localhost server. I don't understand where's the problem when I try to fetch checkMail(),it shows alert failed to fetch and and error in browser console undefined: "Failed to fetch" I have added all my code…
Nizar Kadri
  • 321
  • 2
  • 10
0
votes
1 answer

How can i use promise method in node

I was trying out the promise function for the REST API instead of using axios method. so I can wait for the result and if there is any error. can anyone help me change this code to promise in node.js so I can do a fetch using promise method. thank…