Questions tagged [npm-request]

npm-request is a node package designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.

npm-request is a node package designed to be the simplest way possible to make HTTP calls. It supports HTTPS and follows redirects by default.

Useful links

156 questions
13
votes
5 answers

Firebase: Error parsing triggers: Cannot find module 'request-promise' simple cloud function

Wanted to achieve a firebase only approach to a mobile site, so I decided to make a simple API gateway to my app so I call a cloud function endpoint instead of calling my external API and expose my api keys. I followed the simple hello world example…
neavilag
  • 479
  • 1
  • 6
  • 17
11
votes
3 answers

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

When i try: $ npm install -g cordova@latest always get npm WARN deprecated node-uuid@1.4.8: Use uuid module instead mac Os Sierra 10.12 npm v. 4.4.4 node v. 6.10.2 Before install of cordova: $npm list -g node-uuid /usr/local/lib ....(empty) …
kit62
  • 151
  • 1
  • 2
  • 6
7
votes
3 answers

How to make an external api call within an AWS Lambda function

I'm having problem with a Lambda function which for some reason it goes on timeout. I tried to add some console.log to understand what was going on and everything works properly until the external http request. I use the npm module request I can…
Koop4
  • 3,905
  • 7
  • 24
  • 41
5
votes
4 answers

How can I get the raw HTTP message body using the request library in Node.js?

The npm-request library allows me to construct HTTP requests using a nice JSON-style syntax, like this. request.post( { url: 'https://my.own.service/api/route', formData: { firstName: 'John', lastName:…
Nic
  • 2,809
  • 4
  • 22
  • 30
5
votes
2 answers

How to use ES6 import with 'request' npm module

In ES6-ifying some TypeScript code (the project I'm working runs in both the browser and a Node server, I'd like to tree-shake the browser bundle), I'm trying to eliminate uses of require and only use import. But when I do this... import * as…
Peter Baer
  • 1,164
  • 2
  • 11
  • 18
5
votes
5 answers

How to retrieve PayPal REST Api access-token using node

How to get the PayPal access-token needed to leverage the REST Api by using node?
matteo
  • 1,375
  • 1
  • 12
  • 24
4
votes
2 answers

Error [ERR_STREAM_WRITE_AFTER_END]: write after end [npm-request with socket.io]

On my server side I have socket server listening and in my own laptop I have socket.io-client service and whenever I turn on both they are connecting. And when other people request to my server, server sends that request via socket to my laptop and…
Normurod
  • 63
  • 1
  • 1
  • 9
4
votes
2 answers

Is there any NPM for MapMyIndia?

For a node.js project, I want to use reverse geocoding with mapMyIndia API, but couldn't find any proper package for that. PS: I don't want to use API directly in my code, appreciate the help
4
votes
0 answers

NodeJs request modules runtime Error: ./..../tough-cookie/package.json

When I install NodeJs module, there is a bug in the running. request module is the latest version: npm install request stream.js:74 throw er; // Unhandled stream error in pipe. ^ Error:…
DongYao
  • 2,241
  • 2
  • 8
  • 4
4
votes
0 answers

How to set Content-Length header in a node PUT request when piping a stream

I'm trying to upload node stream data to S3 via a signed url, therefore it is vital that the request contains the Content-Length and Content-Type header. The data I want to upload is provided via a stream var request = require('request') var…
maxb
  • 466
  • 3
  • 14
4
votes
1 answer

How do you set a callback on timeout for the node.js request library?

With node's http library this would look something like var request = http.request(options); request.setTimeout(milliseconds, callback); However, I'm using the wrapper library request and don't see a way to add a callback on timeout. I'm creating…
knightian
  • 623
  • 1
  • 7
  • 17
3
votes
0 answers

why node js is slower than chrome?

I am creating a website using nodejs. In a page of my website, i request to google then parse its results and send them to the user. I use request module of npm to request to google. request module has a flag called time that if i set it to true…
hamid
  • 592
  • 1
  • 7
  • 17
3
votes
1 answer

How to send bearer token and x-www-form-urlencoded data using Node Request

I want to replicate this Postman call using the node module request. See screenshots. Screenshot Screenshot2 As shown in screenshot, in my request, I need to pass a bearer token as well as x-www-form-urlencoded values. I tried following the top 2…
3
votes
3 answers

Using slack webhook with node

I am trying to use slack webhook. I can read a lot of variation about how I should proceed, but until now, none of them worked properly. I am using the request node module to make the api call, but I can change if needed. First try following…
Sharcoux
  • 4,282
  • 4
  • 29
  • 65
3
votes
1 answer

NPM Verdaccio - set uplink to own remote server

I just built an NPM Verdaccio private registry server within our local network and I would like configure an UPLINK to our remote NPM Verdaccio server which is hosted at AWS (and also keep the original npmjs registry). snippet from Verdaccio…
nex.cz
  • 154
  • 1
  • 1
  • 11
1
2 3
10 11