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

Networking issue with alexa-app and request-promise

I have to be missing something really simple here, but here goes. I am just now starting to learn Alexa development, and found the alexa-app module which seems to make Alexa programming really straight-forward - except for this networking issue I'm…
Chris Koenig
  • 2,736
  • 18
  • 17
-1
votes
1 answer

Request HTTP giving binary gibberish results instead of readable text (possible encoding problem?)

Nodejs project that scraps information from a phone web address is returning empty results. When it does the requestHTTP the result that comes off of console.log is something like…
-1
votes
1 answer

How do I await a nodejs request-promise object

I'm trying to return the results of an http request from a function and thought request-promise was supposed to return after an await. I obviously don't have this right. I get "undefined" returned from the function. var s =…
Velocedge
  • 1,222
  • 1
  • 11
  • 35
-1
votes
1 answer

How do I use async-await properly in the following situation?

I'm struggling with async await block. I have looked the multiple resources on the net but I just can't understand what I'm doing wrong here : app.post('/api/my-api', async (req, res, next) => { try { filecontent =…
-1
votes
1 answer

request-promise post request to axios request

Can you please help me convert the following request to axios request. const request = require('request-promise'); const data = {name:'pte', age:30} const options = {secret:'34444'} const opp = { method: 'POST', uri: 'https://something', …
Mbanda
  • 968
  • 11
  • 21
-1
votes
1 answer

Combining json data from 2 urls in nodejs?

const express = require('express'); const app = express(); const path = require('path'); const config = require('./config.json'); const moment = require('moment'); const request = require('request-promise'); url =…
-1
votes
1 answer

Need a request-promise alternative that supports unGzip

It's been 3 days now, 3 days looking and trying different alternatives of request-promise (deprecated), So I really hope someone would be able to help me here. I'm making my first scraping server app, So I was using request-promise bust since it got…
-1
votes
3 answers

Request - Wait till API call is completed Node.js

I'm facing a problem with callback functions and I can't find a solution for that. I need to get one value inside a callback to compare lately. The problem is, when I compare, my variable is still with initial value. router.get('/qadashboard', (req,…
Pedro Guerra
  • 21
  • 2
  • 5
-1
votes
2 answers

How to make a Promise.all with several request

I am trying to go through the list I have of cars to generate the request. These generated requests I want to store in a list but without executing them even to pass it later to an axios.all but the error I get is that at the time of storing the…
user10408704
-1
votes
1 answer

request-promise `.catch` throwing up an error

I want to ask a question about request-promise in nodeJS. I'm new to nodeJS and so far I've produced the following code: const rp = require('request-promise'); rp('https://jsonplaceholder.typicode.com/users/1') .then((htmlstring) => { …
vik1245
  • 546
  • 2
  • 9
  • 26
-1
votes
2 answers

Express js deadlock in promise inside for loop

I have an application with node.js and expressjs and now I have a problem when I tried to insert several records into the database. I have an array with 4 records and the applications insert 3 and the last one returns me a deadlock error from SQL. I…
user3242861
  • 1,839
  • 12
  • 48
  • 93
-1
votes
1 answer

400 status code when using Node.js to hit a specific web page. And a 200 status code when hitting same web page from my browser. What gives?

Web URL in question: https://www.theroyalamerican.com/schedule I am building a node.js script to scrape the web page above using the request-promise package (which grabs the page's html for me). Unfortunately, when I run my code, it gives me a 400…
Ryan Miller
  • 315
  • 8
  • 18
-1
votes
1 answer

request-promise in node.js lack of understanding

i am trying to insert data from js object in a database using request-promise and update the object with the response of the POST but i don't know how to get my updated object in the last .then() I don't understand very good promises and have no…
amerej
  • 139
  • 1
  • 11
-1
votes
2 answers

NodeJS - 'Error: Invalid URI "/"'

I'm using request-promise to request two JSON data files which exist locally in my local project directory folder. ie: However, I am getting a 500 internal server error, when trying to pass the data to the view and my node console outputs 'Error:…
Jonca33
  • 3,333
  • 7
  • 25
  • 35
-2
votes
1 answer

NodeJS - Iterating over API response to access inner fields from object?

I have the following NodeJs code in my AWS lambda as part of a larger lambda. It calls an external API to return data regarding tournament schedules, I am able to get the response back from the API but I am unsure how to access the fields in the…
java12399900
  • 1,485
  • 7
  • 26
  • 56
1 2 3
24
25