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

How to download file over FTP in NodeJS?

I want to download file using absolute FTP URL, like ftp://host:port/dir/file.extension I've tried node-libcurl, wget, wget-improved, request. All failed saying that the protocol must be either HTTP or HTTPS. There are FTP clients available for Node…
Himanshu Shekhar
  • 318
  • 9
  • 15
0
votes
2 answers

Why is req./body.param through a GET request undefined?

my issue is that req.body.param is undefined but body itself returns the wanted json from the requested source. This means my iteration wont work too because i need to access req.body.data.length or the count of the id param available. Thats also…
Simon D
  • 29
  • 1
  • 6
0
votes
0 answers

NODE.JS- trying to scrape movies from IMDB using node . it does not scrape dynamically when i try to enter movie name in my console

var express = require('express'); var cheerio = require("cheerio"); var request = require("request"); var fs = require('fs'); var app = express(); app.get('/scrape/:movie' , function(req, res){ var movie = req.params.movie; option =…
kartik
  • 69
  • 8
0
votes
1 answer

nodejs request - toString failed - buffer size issue for big files (maxBufferSize)

I'm requesting a big file with 150K records but it throws 'toString failed' error. nodejs/node#3175 says it's because of maxBufferSize. Request works well for 200 records but its an external api and the requirement is to get all records at once.[no…
Raza Ahmed
  • 2,661
  • 2
  • 35
  • 46
0
votes
1 answer

node - make a request retry on 429 error?

I am using the node module 'request' to send up some JSON to my REST API. I have the following call request({ uri: urlToUse, // Using the url constructed above. method: "POST", // POSTing to the URI body: JSON.stringify(jsonItems), …
0
votes
1 answer

How to form url and send http request with data in Node.js

i want to form url with below "Raw Request" then send request to it in nodejs,how can i do this. Raw Request: ----------- POST /sky?api_key="" HTTP/1.1 Host: https://sky.in Content-Type: application/json Connection: close Content-Length:…
scionoftech
  • 608
  • 2
  • 9
  • 24
0
votes
0 answers

Node gets stuck with request module

I've built a web crawler and it's always getting stuck after a while. It just stops there, though script doesn't break. async.eachSeries(links,function (item,callback){ request({ url: item.uri, encoding: null, headers: { …
Sasha Davydenko
  • 794
  • 7
  • 12
0
votes
2 answers

NPM Request not get html from thai url. (Web Scraping)

This code will not show html in console it show error var request = require('request'); var thai_url = "http://pantip.com/tag/Honda_(มอเตอร์ไซค์)"; request(thai_url, function (error, response, html) { if (!error && response.statusCode ===…
0
votes
1 answer

Async piping file to an HTTP request

I'm trying to send off interleaved GET and POST requests to a server, but the POST request is sending data from a file, which seems to throw off the timing. var async = require('async'); var http = require('http'); var request =…
knightian
  • 683
  • 1
  • 7
  • 20
0
votes
0 answers

npm request module's formData is undefined in POST call to another Server + Express4.x.x

var form = { widgetReleaseId: req.body.widgetReleaseId, version: req.body.version, uploadDate: req.body.uploadDate, myfiles : myfiles }; Below…
0
votes
1 answer

Upload photo to Tumblr API with nodejs and request module

So I want to upload an image to the Tumblr API with the npm request module. Being familiar with the facebook and twitter API, those requests worked like this: for Facebook: - create a readstream: var media = fs.createReadStrem('imgpath'); - make a…
instance
  • 88
  • 1
  • 4
0
votes
1 answer

Node file upload ends with 502 Gateway Error

I am trying to upload a file using request module to Telegram's Bot API. However, I end up with a 502 Gateway Error. Here's my code: var request = require("request"); var fs = require("fs"); fs.readFile("image.png",function(err,data){ var…
An SO User
  • 24,612
  • 35
  • 133
  • 221
0
votes
1 answer

Error conditions for NPM Request lib

An error is being passed by the callback in my request function. I am trying to determine under what conditions an error is passed to the callback. var request = require('request'); request('http://www.google.com', function (error, response, body)…
user5047085
0
votes
2 answers

Can npm request module be used in a .pipe() stream?

I am parsing a JSON file using a parsing stream module and would like to stream results to request like this: var request = require("request") fs.createReadStream('./data.json') .pipe(parser) .pipe(streamer) .pipe(new KeyFilter({find:"URL"})…
jdungan
  • 243
  • 2
  • 10
-1
votes
2 answers

How to I can solve this problem to staring in my laravel project to install npm

After running npm install on project, I face this problem npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on…
Najmun Nafiz
  • 15
  • 1
  • 4
1 2 3
10
11