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

Call common function before and/or after HTTP request in angular 2

I need to setup common loader into entire angular2 project. So i just want to do is when my new http call generate either it's GET, POST, or PUT then before request sent loader is appear. Once http response(success or error) arrive from server side…
Jitendra Solanki
  • 343
  • 2
  • 6
  • 23
2
votes
3 answers

npm adduser Incorrect username or password

I am newbie to npm. I am trying to create username password with npm. Here is my code: abhi@abhi-Lenovo-Z50-70:~/Desktop/CSS_HTML/With_JS$ npm adduser Username: abhishek Password: Email: (this IS public) parikh5555@gmail.com npm WARN adduser…
Abhishek Parikh
  • 949
  • 1
  • 20
  • 41
2
votes
1 answer

How to wait a request response and return the value?

When I use a request module in node.js server, I have some problem such as wait and return. I would like to receive a "responseObject" value at requestController. To solve this problem, I have search the best way but I still do not find it. How can…
JaeYoungHwang
  • 99
  • 1
  • 4
  • 11
2
votes
1 answer

using Request npm module synchronous in Meteor 1.3

I try to use request npm package in Meteor 1.3.2.4 as synchronous. Based on this Meteor guide article, first I try to use Meteor.bindEnvironment like below: import request from 'request'; let result = {success: false, error: null, content:…
b24
  • 2,425
  • 6
  • 30
  • 51
2
votes
2 answers

Getting original request object during multiple asynchronous calls in nodejs-request

I have multiple HTTP requests in a nodejs app that each returns a word of a sentence. The replies will come at different times, so I'm saving them in a dictionary, with the key being the original sentence's word index. Problem is, when I access the…
chintogtokh
  • 803
  • 1
  • 10
  • 25
2
votes
1 answer

node - Invalid uri error in npm-request

var request = require('request'); var options = { url: 'https://connect1on1.com/api/web/index.php/v1/message/save-message', method:'POST', body:JSON.stringify({"id": data.user_id, "message": data.message}), headers:…
Mustafa bw
  • 1,290
  • 3
  • 12
  • 21
2
votes
1 answer

Upload POST submitted image in Meteor

I am getting started and could not find anything or anything that i understand on uploading POST submitted image in Meteor, is it supported right out of the box, if not how do i handle it? So Far Manage to break it down as: I need to make Server…
monk
  • 4,727
  • 13
  • 45
  • 67
1
vote
2 answers

npm ERR! Error: EPERM: operation not permitted, mkdir

I'm installing express on disk D:/ but I found an error when I installed it, but if I install express on disk C:/ it worked and I reinstalled it on disk E:/ and D:/ Errors like this appear.enter image description here
faisal hanafi
  • 13
  • 1
  • 3
1
vote
1 answer

Unable to authenticate github and npm

$ npm login --scope=@username --registry=https://npm.pkg.github.com $ Username: username $ Password: ******** $ Email: (this IS public) example@gmail.com $ npm ERR! code E401 $ npm ERR! 401 Unauthorized - PUT $…
Felix Orinda
  • 593
  • 4
  • 20
1
vote
0 answers

not able to install request type definition in typescript

I am new to typescript. As I was following a video tutorial of using a request api. I used following command to install request library: npm install request --save then, in order to use auto-complete in visual studio code editor for typescript, I…
JPG
  • 1,247
  • 5
  • 31
  • 64
1
vote
1 answer

Passing cookie's with redirects using request in node.js

I am trying to scrape a web site using node.js and request. It was working fine and then all of a sudden today I started getting errors about exceeding the maximum number of redirects. I promptly pulled up developer tools and hit the page and saw…
Chris H
  • 501
  • 1
  • 4
  • 15
1
vote
0 answers

Returning an object from a callback

I want to return an object out of a callback. When I run the below code, the log of the body object looks as expected. It appears to be the correct JSON object containing the response I want from the server: name, email, website, etc. But the result…
Let Me Tink About It
  • 15,156
  • 21
  • 98
  • 207
1
vote
1 answer

404 in Protractor for known working non-root Angular pages

Why does the following code produce a 404 status code for http://localhost:4200/page yet a 200 status code for http://localhost:4200? When Protractor is running I'm able to open up another browser window and type http://localhost:4200/page into the…
Matt Thomas
  • 5,279
  • 4
  • 27
  • 59
1
vote
2 answers

Polling URL synchronously

I'm looking to make a function which polls a certain URL synchronously (i.e. send one request, wait for it to come back before sending another). However, I'm unsure of why this is not working. const request = require('request') let count =…
JC1
  • 849
  • 13
  • 25
1
vote
1 answer

Error: ESOCKETTIMEDOUT but doesn't seem to be DNS like other SO posts suggest

I am having some issues with the npm request package and getting it to call any URL properly unless the URL is to a server that is off. Example, I can't call amazon.com but I can call dev.personalDomain.com which points to an EC2 instance that is…
joshk132
  • 1,011
  • 12
  • 37
1 2
3
10 11