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
1 answer

Reddit gives 403 when upvoting via API

I've registered as the Web app as required by the Reddit API for the Oauth access with identity, edit, flair, history, modconfig, modflair, modlog, modposts, modwiki, mysubreddits, privatemessages, read, report, save, submit, subscribe, vote,…
Sridhar
  • 11,466
  • 5
  • 39
  • 43
1
vote
1 answer

Nodejs request post with body include api key

I have been trying about a week but I couldn't make a post request to get a result. I tried a bunch of middlewares (exp: 'request', 'axios', 'reqclient','superagent etc..) but I couldn't make it. Please provide me a simple post request with sending…
Enis Gur
  • 89
  • 1
  • 9
1
vote
1 answer

Node.js Not able to convert x-zip-compressed to application/zip

Here is part of my code which is fetching a zip file uploaded to Azure blob, and sending it back to the caller. The content-type returned by Azure is application/x-zip-compressed. However, I need to return application/zip. If I do not set the…
TechiRik
  • 1,893
  • 6
  • 27
  • 37
1
vote
1 answer

NodeJs/Electron, Request Post not catching Request Body

I've got some simple code that isn't working. Have tried several libraries, all of which wind up giving me similar errors. I'm convinced the website itself is somehow rejecting the request. It's wrapped in an electron application. This is the…
1
vote
1 answer

Await async functions to be done in reduce() function

I have a fuction which includes the following: const newThreads = newItems.reduce( (acc, item) => { request(item.href, function(error2, response2, html2){ if(!error2) { const thread = cheerio.load(html2) const today =…
Getter Jetter
  • 2,033
  • 1
  • 16
  • 37
1
vote
1 answer

Node.js Simple Google API Request: error:0906D06C:PEM routines:PEM_read_bio:no start line

I have tried everything on this thread with no luck. Node.js https pem error: routines:PEM_read_bio:no start line I am trying to do a very simple request to the google API to ask for a channel's information. Things I have: npm request installed A…
hadro
  • 13
  • 5
1
vote
1 answer

Stub response for Request NPM module in unit test in order to test pipe()

In my Express (NodeJS) application I am using the request library (https://www.npmjs.com/package/request). The endpoint I am requesting triggers a data download which I pipe into a local file. function downloadData(filePath) { request …
Laura_E
  • 169
  • 1
  • 10
1
vote
2 answers

nodejs request-promise url location not showing in headers

I'm currently using request-promise in nodejs to make a request to a website and then return the headers, as I'm trying to get the url (location) of the request incase of redirects. Although the issue I'm having is that the location is not showing…
adevh
  • 103
  • 4
  • 12
1
vote
1 answer

web scraping with node npm request

I'm trying to scrape a website: http://www.vehiculo-robado.com but is returning me this: error: null statusCode: 200 body:
1
vote
1 answer

getaddrinfo ENOTFOUND error on proxy with axios

I have one question is when I am hitting a proxy server using axios, I am getting below error, while using npm "request" module it works fine for me. If anyone can please share thought on this. Thanks in advance. Error: getaddrinfo ENOTFOUND…
Abhishek Jain
  • 285
  • 1
  • 3
  • 12
1
vote
1 answer

Request defaults, use a function as default header

When using the NPM request module's request.defaults API, does anyone know of anyway in which I can pass a function as a request header, so that the function's result becomes the header value everytime I make an outgoing…
maxcbc
  • 31
  • 2
  • 7
1
vote
1 answer

node.js express dns lookup to use ipv4 always

Is there a way to have the express.js server always use do a dns look up for IPV4 addresses instead of both IPv4 and IPV6 addresses? Like we do this in a java JVM by setting the parameter java.net.preferIPv4Stack=true I am looking to do this for…
mandy
  • 735
  • 1
  • 9
  • 24
1
vote
2 answers

POST json file using request module

I am planning to translate the curl API call below to node.js though I am still getting an error when doing a POST. curl -X POST --user user1@customer1:secret http://demo.test.com/controller/actions/38 -F file=@ExportActions.json Below is initial…
JPaulPunzalan
  • 417
  • 1
  • 6
  • 20
1
vote
1 answer

Stuck in infinite redirect loop when http get an chunked response

i'm trying to get the body of the following url https://extranet.ores.be/de/services/price-simulation using the npm module request. The thing is , for this link, the module doesn't work properly i think. Because it continuously fail with a…
1
vote
1 answer

Fibers/Future Can't Wait without Fiber

Hello i'm trying to use fibers for waiting request but it gives an error 'Error: Can't wait without a fiber' What should i do to work with that.By the way im not using meteor just pure nodejs. const Fiber = require('fibers') const Future =…
Uğur Oruc
  • 56
  • 14