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

TypeError: Cannot read property 'name' of null NodeJs

I am learning and experimenting on NodeJs. I am using request-promise to call another api from NodeJs. I am using form-data to create a form and send it to another api. My snippet: const requestPromise = require('request-promise'); const FormData =…
2
votes
1 answer

Vue.js Can't get the data out of a get request into a variable

I am running a server that is serving a Vue.js app. So if I input http://localhost:9999/ into my browser, the browser gets 4 important files: post.js, get.js, vue.js and the index.HTML with the vue code. I got a dynamic ordered list to work where…
vueNoob
  • 51
  • 1
  • 6
2
votes
2 answers

node.js catch block not firing as expected on await

My node process exited after logging E callback: [Function: RP$callback], E { serviceName: '....', E errno: 'EAI_AGAIN', E name: 'RequestError', But I thought the below code would catch exceptions and return the defaulted value var rp =…
brent
  • 1,095
  • 1
  • 11
  • 27
2
votes
2 answers

Node post request body gets truncated

when trying to post a WakeUp event with a JSON body to the Alexa events API using nodejs with axios or request-promise, the API always returns an error 500. I posted to an online endpoint to actually see what gets posted and learned that the post…
dnlmnn
  • 23
  • 5
2
votes
1 answer

AWS S3 - Fetch PDF as octet-stream and upload to S3 bucket

I'm fetching a PDF from a 3rd-party API. The response content-type is application/octet-stream. Thereafter, I upload it to S3 but if I go to S3 and download the newly written file, the content is not visible, the pages are blank, viewed in Chromium…
ethane
  • 2,329
  • 3
  • 22
  • 33
2
votes
1 answer

How can I send pdf to client from API request

I'm sending a request to an API that returns pdf files. I've tried res.send(data) but it doesn't work, and just returns a blank PDF file. rp("URI") .then(data =>{ res.contentType("application/pdf") res.send(data) }) …
2
votes
1 answer

How to log cookies from a cookie jar?

How can I log cookies that are stored in a cookie jar using the request-promise npm module. I have tried printing the cookie jar variable but as expected that does not work. How I am creating the jar, var request = require('request-promise'); var…
Ogden
  • 477
  • 1
  • 8
  • 21
2
votes
3 answers

NodeJS Post Request with Request Promise for Twitch Authentication

I'm trying to authenticate a user on my app through their Twitch login. I cannot seem to get request.post() right (using request-promise). I've tried many different variations and I'm usually getting "Unhandled rejection" in the server logs. The…
Nick H
  • 217
  • 4
  • 19
2
votes
1 answer

Error using request-promise in node.js to print external api data to console

I am just trying to print some data to the console to make sure my node.js app is receiving data to manipulate. I have formatted my code like so. const rP = require('request-promise'); rP({ 'method' : 'GET', 'uri' :…
Manny
  • 23
  • 3
2
votes
2 answers

How to get full response instead of just body using await in reactJS

I'm using the request-promise-native library, and I'm trying to get the full response from a request instead of just body because there is something in the response header I need to log. I know usually to accomplish that task you would do something…
2
votes
1 answer

Getting 403 Error using request-promise to scrape site for price

I'm trying to use request-promise to scrape a the price of an item from Asos.com. When I attempt to run the code below, I get a 403 error. Is this possible that I get this error although the URL that I am attempting to scrape is publicly available,…
kmpace
  • 33
  • 1
  • 5
2
votes
1 answer

request-promise html request behind proxy

iam trying to get response from REST api behind proxy. When testing manually with browser (chrome, IE), i can get the results from GET request when proxy is configured in the browser. But when iam tryin to do the same in nodejs with npm package…
psova
  • 192
  • 2
  • 11
2
votes
2 answers

How to ignore self signed certificate issue in request-promise

I am using request-promise module for my node app to make some API call. https://www.npmjs.com/package/request-promise import request from 'request-promise'; let options = { method: GET, json: true, …
undefined
  • 3,464
  • 11
  • 48
  • 90
2
votes
3 answers

How to call other REST APIs from your node micro-service and send the result as a response?

I am currently trying to implement a BFF (backend for front end architecture). Using request-promise library I can successfully hit the other microservice but not able to return the result as a response from BFF microservice. Each time it is…
2
votes
2 answers

How to fix RequestError: Error: connect ETIMEDOUT while running Mocha JS/NodeJS test from behind proxy

I am getting the below error while trying to run Mocha JS test case which runs npm request-promise to call a REST service. I was able to connect to the REST URI endpoint through ARC client bur it failed with below error while running through…
Kunal Patil
  • 745
  • 1
  • 9
  • 18
1 2
3
24 25