Questions tagged [node-request]

A node.js NPM package for handling HTTP requests.

Request.js is a popular package for which offers a simple HTTP abstraction layer with a comprehensive API / library for handling a range of common uses when making requests.


Documentation:


As of Feb 11th 2020, request is fully deprecated. No new changes are expected to land. In fact, none have landed for some time.

For more information about why request is deprecated and possible alternatives refer to this issue.

332 questions
0
votes
1 answer

Scraping javascript generated content using request in Node.Js

I need to scrape some content from Google search results that only shows in browsers (I suspect it's when Javascript is enabled) – specifically, their Knowledge Graph "People also search for" content. I use a combination of request and cheerio to…
Aerodynamika
  • 7,883
  • 16
  • 78
  • 137
0
votes
1 answer

Async web requests are making 'socket hangup' in node.js

I am writing a code that 'for' loops a large number of time to scrape web pages. Code is like: var request = require('request'); for(i=0; i<10000; i++){ //request goes here, with processing in its callback } But this causes socket hangup. Then I…
XIMRX
  • 2,130
  • 3
  • 29
  • 60
0
votes
1 answer

Rest API node - Parameter in between

I know this is Novice question but couldnt find a best way to do it. I want to build a rest API with paramater inbetween like /api/blogs/:blogid/articles/:articleId I want to route to proper method and identify both blogid and articleid and return…
procoder
  • 31
  • 1
  • 7
0
votes
1 answer

Trying to use Node Request to authenticate

I'm trying to use the Node module Request to authenticate on a website, and after following instructions I still can't seem to figure it out... Using Coffeescript I've done the following: Request { url:…
Jody Heavener
  • 2,704
  • 5
  • 41
  • 70
0
votes
0 answers

NodeJS streaming array as argument to request

I have an array of parameters, which I then transform into an array of urls. I would like to then stream this array of urls to request. var parameters = [1,2,.., n] var urls = []; parameters.forEach(function(item) { …
Bondifrench
  • 1,272
  • 1
  • 20
  • 35
0
votes
1 answer

Use request module to download and get urls in mobile application

I made a small script that use request: request({ url: "http://gdata.youtube.com/feeds/api/videos?alt=json&max-results=1&q=" + encodeURIComponent(trackName), json: true }, function (dataAndEvents, deepDataAndEvents, data) { }); and now I want…
Vinz243
  • 9,654
  • 10
  • 42
  • 86
0
votes
5 answers

Block function whilst waiting for response

I've got a NodeJS app i'm building (using Sails, but i guess that's irrelevant). In my action, i have a number of requests to other services, datasources etc that i need to load up. However, because of the huge dependency on callbacks, my code is…
Dean Thomas
  • 1,096
  • 1
  • 10
  • 25
-1
votes
1 answer

Can't make http://freeastrologyapi.com API request in React

I'm trying to submit an API request based on the tutorial on FREE ASTROLOGY API , but it seems that because the request library is not maintained npm installing it breaks my 100 of my node files all at once. I tried using axios, but I get a lot of…
-1
votes
1 answer

Not being able to read statusCode when sending a request

I am developing an api with node.js but i am having trouble with one of my routers while sending a request in postman. The following is my router: //@route GET api/profile/github/:username //@desc Get user repos from github …
mateo ghidini
  • 83
  • 1
  • 10
-1
votes
1 answer

Node Js get request in for loop and collect responses in an object

nodejs / meteorjs newbie here, I am trying to query an api in for loop and collect all responses in one object and return that object. here is my code set up const req = require('request'); const getallJira = (namespace, services) => { let…
-1
votes
1 answer

Nested element object

I would to navigate inside json to parsing json'data'. I tried to use JSON Stringfy but nothing. Another i would to navigate inside data to parse 'hometeam' for example. Thank you for your eventually help var TelegramBot = require…
-1
votes
1 answer

Node js request module get different type (format) of return value from server?

I use request library to access web service, but I found that the return value can be different. exports.getUserByEmail = function(req, res) { request.get(endPoint + req.params.email, function(error, response, user) { console.log((typeof…
Alex
  • 135
  • 1
  • 15
-1
votes
2 answers

Sending many requests from Node.js to an API causes error

I have more than 2000 user in my database , when I try to broadcast a message to all users, it barely sends about 200 request then my server stops and I get an error as below : { Error: connect ETIMEDOUT 31.13.88.4:443 at…
Ahmed Ibrahim
  • 380
  • 5
  • 22
-1
votes
1 answer

Memory leak using mongodb (and cheerio, request, and async.js)

I am on scraping actions on nodejs, I am using request to connect to site, cheerio to access to the data and mongodb to store the data extracted. Also I am using async.js to avoid infinite recursion. I have got a memory problem because my process…
-1
votes
4 answers

Node.js keeps a copy of a global variable inside local scope

I have a Node.js application that uses the request library to GET a number of URLs. The code is something like this: for(var i = 0; i < docs.length; i++){ var URL = docs[i].url; request(URL, function(error, response, html){ …
Ibrahim
  • 837
  • 2
  • 13
  • 24
1 2 3
22
23