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
4
votes
1 answer

AWS Lambda external URI request error: connect ETIMEDOUT

I coded in my local dev environment a node.js function that does several requests to an external url-uri (asynchronously using bluebird and request-promise). It works fine, the function gets the results and save the information into the EC3…
NorthmaN
  • 105
  • 2
  • 11
4
votes
3 answers

NodeJS - ERR_INVALID_ARG_TYPE Error thrown while issuing a HTTP request to remote host

Recently, I encountered a problem while trying to issue a request using NodeJS and request-promise. The following code is nested inside a multer call for file uploading (using nested functions / clusters. const options = { method:…
4
votes
1 answer

Using Slack's API dialog_open from Firebase Cloud Functions

Goal A Slack Event-Subscription event is hitting my Firebase Endpoint, and then, a Firebase Cloud Function is using the dialog_open endpoint to open a dialog in Slack with some values from Firebase. Issue When the Firebase Cloud function hits…
4
votes
1 answer

Looping & Nesting Promises

I am using Request-Promise and cheerio to scrape some website data, essentially I am trying to achieve the following: Create An Empty Array Login Get some info from one page and push objects into the array Get some info from another page and push…
Chris Talke
  • 120
  • 1
  • 8
4
votes
1 answer

Convert garbled character to ISO-8859-1

I'm trying to grab some text from a Portuguese site that is encoded in ISO-8859-1 according to the meta tag. I'm using NodeJS and the request-promise package. What I get back, for example, is Alg�s I believe I need to convert that to ISO-8859-1 in…
pedroremedios
  • 763
  • 1
  • 11
  • 39
4
votes
2 answers

Different response with same scope & path with different auth header with Nock, possible?

I'm using 3rd party API which has /places endpoint which returns the information of the places the authenticated user has permissions as JSON. That API is using JWT as authentication, the token is placed in X-Auth-Token header. My project has a…
Masza
  • 331
  • 1
  • 3
  • 12
3
votes
1 answer

RequestError: Error: getaddrinfo ENOTFOUND, not for all users

I have a windows electron application that is throwing the following error: RequestError: Error: getaddrinfo ENOTFOUND thedomain.com I'm using the request-promise-native library for my requests. The only issue is that many other users of the…
Getek99
  • 479
  • 2
  • 5
  • 18
3
votes
1 answer

write a while loop using promises using return values within the next promise

I have read all the questions on SO about this subject but I'm still stuck because the condition function in promiseWhile does not take a parameter. My use case is the following. I am trying to query some information for some date (start_date). I do…
Chapo
  • 2,563
  • 3
  • 30
  • 60
3
votes
0 answers

Calling external API (AWS EC2 server) from Firebase Cloud Function

Anyone can help me out of this?.. I'm using request-promise to call an API from AWS in firebase functions below is the code im using, and the image is the output. I'm wondering why it returns statuscode 400 with the expected output from the API…
3
votes
1 answer

HTTP Auth request fails in browser due to CORS, ok in Node

I'm stuck trying to diagnose a problem where a GET request with HTTP Basic Auth succeeds in Node, but fails in the browser. The problem manifests directly as a CORS failure (there's no Access-Control-Allow-Origin on the 401 page). request.js:119…
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
2
votes
0 answers

IndexedDB update multiple record

I am using indexedDB, and I have a orderProductIndex index inside the order_items collection. The index is not unique! What I want to do is, select every record from the index with a specific id, and update their timestamp value. I can update one…
2
votes
0 answers

How do you read a promise object in NextJS?

I need to read a promise and do things with the data in the promise object but I am not sure how to work with it. Below is the function I am using to initially pull the data: export async function getBalance(coin, walletId) { const req_url =…
Mabel Oza
  • 557
  • 8
  • 22
2
votes
2 answers

Sequential Promise

so I am trying to execute my promises sequentially without using async below is my code //promises is an array of function who return a promise const p = function(promises){ let result = promises.reduce((prevPromise, promise) => { return…
2
votes
1 answer

nodejs unhandled promise rejection when app.post

When my angular frontend sends post request order(market: string, price: string, side: string, size: string): Observable { var payload = { market: market, order: { price: price, side: side, size: size } }; return…
bbusdriver
  • 1,577
  • 3
  • 26
  • 58
2
votes
1 answer

Run HTTP requests in chunks

I want to run 1 thundered http requests in configurable chunks, and set configurable timeout between chunk requests. The request is based on the data provided with some.csv file. It doesn't work because I am getting a TypeError, but when I remove ()…
user3652705
  • 23
  • 1
  • 5
1
2
3
24 25