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

158 questions
1
vote
0 answers

Streaming files from server to electron/angular2 client using request library

I am creating a desktop application using angular2 and electron. This client needs to download zip files from a server using the request library. To be able to download files is only the first step, The client application will also need to be able…
Thor
  • 459
  • 4
  • 15
1
vote
3 answers

Repeatedly calling Rest Endpoint from NodeJS

I am very new to Node family. I have a service which has two endpoint exposed. One is a post method - which takes a payload (which gets processed asynchronously) and sends an acknowledgement to the caller immediately. Another one is a get…
Swarup Saha
  • 895
  • 2
  • 11
  • 23
1
vote
1 answer

SoundCloud API: same call, different response between curl and NodeJS

I have a problem calling the SoundCloud API: for the same API call from the same server I get different results between doing a CURL request and NodeJs. The following two calls have been made within 2 seconds one from the other. Call from our server…
1
vote
2 answers

Upload file to Amazon S3 using HTTP PUT

I work in a financial institution and for security reasons my employer cannot give out the access key id and the access key secret to the AWS account. This means I can't use aws-sdk. As a next option, would it be possible to upload files using HTTP…
ChrisRich
  • 8,300
  • 11
  • 48
  • 67
1
vote
0 answers

npm request conditional piping based on response

I need to download a file by POSTing to a REST server. I was first using http when it was get. But now i need to use POST, and node's http post is way too complicated, I dont want to build a low level request, so I dont want to use it. I am now…
Dushyant Bangal
  • 6,048
  • 8
  • 48
  • 80
1
vote
1 answer

Download Image with Node-Request with URL scan from CSV

Pardon me as the code is messy. I'm still learning. I need to download the image with the URL scan from a CSV file. However i have 2000+ of URL with the same domain, and i don't think the server will let me to pull everything in a go hence i always…
user2982110
  • 105
  • 1
  • 4
  • 10
1
vote
0 answers

Exception in callback of async function: Error: Future resolved more than once

Hi guys I try to use proxy-verifier NPM package in Meteor like below: import ProxyVerifier from 'proxy-verifier'; // this is my method call on server startup Jobs.find().forEach((job) => { Meteor.call("checkProxy", job.proxy, (error, result) => { …
b24
  • 2,425
  • 6
  • 30
  • 51
1
vote
2 answers

Sending/handling GET requests in typescript using Express, Request and Node.js

I'm using a combination of Express and Request (installed using npm) to try to send a get request to get some json from the server. However no matter what I do the body that is returned is "undefined". This is the code in my server.js file. The…
annedroiid
  • 6,267
  • 11
  • 31
  • 54
1
vote
2 answers

Set node request header based on encoded formData value

I'm attempting to send an HTTP POST, using the request npm package, to an API that requires a special header, consisting of a base64 encoded MD5 hash of the request body's string representation. Code to generate the MD5 hash: function md5(val) { …
Brian Shamblen
  • 4,653
  • 1
  • 23
  • 37
1
vote
2 answers

Trouble with node asynchronous GET request using promises

I'm very new to programming (3 months) and am having trouble with how node handles asynchronous functions (I think). I have a Merchant class object with a method "addMenu" that makes a GET request for a menu from an external API and then updates…
greenleaf
  • 21
  • 2
1
vote
1 answer

How to call (NPM) request multiple times in mocha before hook?

I would like to call request multiple time (2 times) in mocha before hook. Is there a correct procedure/way to call them. My current usage is like this and I get error done() called too many times. describe('...', function(){ …
Bala
  • 11,068
  • 19
  • 67
  • 120
1
vote
1 answer

I am not behind a proxy but still getting error while installing packages using npm

here is the output from npm-debug.log info it worked if it ends with ok verbose cli [ 'D:\Softwares and Codes\NodeJS\NodeJS\\node.exe', verbose cli 'D:\Softwares and Codes\NodeJS\NodeJS\node_modules\npm\bin\npm-cli.js', verbose cli …
1
vote
1 answer

npm tough-cookie: save a cookie and then dump it

I want to do a very simple task: make an http request (npm install request) to http://google.com and save its cookie to cookiejar see a list of cookies in cookiejar in the console to verify that the cookie is indeed there dump all cookies from…
dot-punto-dot
  • 261
  • 4
  • 17
1
vote
1 answer

How to create a writeStream of a remote file using request?

I'm trying to achieve it using following code as mentioned in npm-request but I get TypeError: Object # has no method…
JyotiChhetri
  • 289
  • 1
  • 7
  • 21
1
vote
1 answer

Node.js request return Error: connect ECONNREFUSED when set options parameter

request works fine if I send it with url with required attributes as first parameter but failed each time when trying to send with options object parameter that contains request attributes: "use strict" var https = require('https'), request =…
Alex Kamornikov
  • 278
  • 2
  • 10