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
1
vote
3 answers

Async not awaiting function before running

I'm trying to parse a specification website from saved HTML on my computer. I can post the file upon request. I'm burnt out trying to figure out why it won't run synchronously. The comments should log the CCCC's first, then BBBB's, then finally one…
Nick Bull
  • 9,518
  • 6
  • 36
  • 58
1
vote
1 answer

Cannot determine why request-promise-native fails on a 'POST with a 404'

I'm trying to make this brief. Hopefully, it isn't so brief it makes no sense. I need to read a list of identifiers from an API that will be used to subsequently 'GET' the JSON files associated with the keys in the list. The list array is stored in…
doug5solas
  • 77
  • 10
1
vote
0 answers

How to handle cache in request promise native

Hi currently i'm facing an issue that while using request-promise-native npm cache is not cleared properly that why getting previous result back as a response.How to handle cache in options. Here is my code, const request =…
Abhilash G
  • 109
  • 1
  • 11
1
vote
0 answers

Cannot access url inside docker container via node application, but curl to the same url works

I am working on a microservice which tries to access a url. Headers for Authorization and Content-type is set. NPM is working fine. Using curl to access the same url with Authorization header also gives the result. But I'm getting this error while…
sks147
  • 196
  • 2
  • 8
1
vote
1 answer

OAuth2: how to get token?

I'm getting this error RequestError: Error: Argument error, options.body after sending a request. I saw this in the API: grant_type = partner partner_id = partner id partner_secret = partner secret This is the source code: getToken() { let…
Geschirre
  • 21
  • 4
1
vote
0 answers

MailChimp API - oauth2 access_token request error

I'm using mailchimp api https://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/ to authorise my app using oAuth2. I can successfully retrieve access_code but when I make a request to…
1
vote
0 answers

Node.js scraping multiple links with Cheerio giving array of null

I am writing a node.js application which scrapes a web page to get a bunch of anchor tags (links) (close to 50-60). Then it goes through each of those links, scrapes that page and within the page it looks for a matching keyword inside a div. If that…
codeinprogress
  • 3,193
  • 7
  • 43
  • 69
1
vote
1 answer

Typescript/Request-Promise: Cannot invoke an expression whose type lacks a call signature

I have a server endpoint that I want to either return the result of an async request or a promise rejection Promise.reject('error message'), however when I add the Promise.reject to the function instead of just returning the async request, I get…
user7367101
  • 41
  • 1
  • 6
1
vote
1 answer

promise all return error too many requests

I'm using promise all for send multiple promises and I get this error 429 - {"error":{"code":"TooManyRequests","message":"Too many requests"}} I have list of data and I chunk data by group of 10 and then I send for each of them notification …
Manspof
  • 598
  • 26
  • 81
  • 173
1
vote
2 answers

How to build a transaction system into a .then() chain?

I have multiple chained, synchronous requests in my code. I am using the NodeJS package request-promise. Here is some pseudocode to show how it is formatted: initRequest.then(function(response){ return request2; }).then(function(response2){ …
gkgkgkgk
  • 707
  • 2
  • 7
  • 26
1
vote
1 answer

Rate limiting request-promise in for loop

I'm trying to to limit the rate at which I'm firing GET requests to an outside API using promises but I'm having difficulty getting it working. In my scenario, I'm using 'request-promise' module and I need to send GET requests for 175 items from an…
Ridhwaan Shakeel
  • 981
  • 1
  • 20
  • 39
1
vote
1 answer

Chaining promises in nodejs with request-promise

I know there is a lot of stuff out there explaing the concepts but I am still confused why my node.js example does not work. I have a main function function main(){ login() .then( function(result) { return getMyInfo(); …
solaire
  • 475
  • 5
  • 22
1
vote
1 answer

RequestError: Error: read ECONNRESET nodejs

I try to use nba.com api, but give me that Error. "RequestError: Error: read ECONNRESET at new RequestError (c:\Users\Omer\Desktop\game\node_modules\request-promise-core\lib\errors.js:14:15) at Request.plumbing.callback…
omer cohen
  • 272
  • 1
  • 4
  • 19
1
vote
1 answer

http/2 push promise authority pseudo header

The http2 rfc http://httpwg.org/specs/rfc7540.html says: All HTTP/2 requests MUST include exactly one valid value for the :method, :scheme, and :path pseudo-header fields (Note it doesn’t include authority) for push promise: The server MUST…
lf215
  • 1,185
  • 7
  • 41
  • 83
1
vote
2 answers

nodejs request-promise url location not showing in headers

I'm currently using request-promise in nodejs to make a request to a website and then return the headers, as I'm trying to get the url (location) of the request incase of redirects. Although the issue I'm having is that the location is not showing…
adevh
  • 103
  • 4
  • 12