333 questions
-1
votes
1
answer
167
views
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 ...
0
votes
1
answer
196
views
How to make synchronous calls in node.js with request and cheerio
I'm working on a node.js project in which i'm taking input from a text file and trying to generate a json file containing the output.
My text file contains multiple categories of data which are ...
0
votes
0
answers
123
views
How to resolve multiple requests in a map using NodeJS?
I'm a bit confused on how to resolve my requests multiple times without affecting the performance of my code in nodejs (v16.13.0)
It turns out that I am doing a monthly report and in this I need ...
1
vote
0
answers
515
views
Is there is any solution to show output of node JS in vs code terminal
I am a new learner of nodejs. I am using VScode for node Js file. The output of the file is shown in the node JS terminal, But for my convenience, I want to do it in the VScode terminal. when I wrote ...
0
votes
1
answer
1k
views
node red cannot GET /myfile from directory
I would like to ask.
I have file in C:\users\nxf68958\.Node-red\report.html
And when I would like to open this file by: localhost:1880/report.html
I get:
Cannot GET /report.html
in Log I have: "...
1
vote
1
answer
228
views
'An error occurred while trying to authenticate: Failed to validate signature.' While using `oauth-1.0a` and nodejs
I'm getting this odd error in nodejs when I try to send a post request with oauth-1.0a and node.js.
Request:
Headers:
Authorization: OAuth <...>
Accept: 'application/xml',
Content-Type: '...
-1
votes
1
answer
75
views
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
//...
2
votes
1
answer
143
views
How do I take data from multiple node-request bodies and pass into an EJS file
I am creating a website which uses an api to dispaly football (soccer) scores, fixtures etc. I have tried to create a global variable to save the request data to and then pass into ejs however this ...
2
votes
2
answers
12k
views
nodejs - AxiosError: Request failed with status code 500
I am trying to convert the below code which is using request module to axios module to send the POST request.
request module code:
const imageFile = fs.createReadStream('image.jpeg');
const imgName = &...
0
votes
0
answers
25
views
How to handle promise return inside NodeJs HTTP? [duplicate]
Using Cpanel, i setup a NodeJs server app as follows (mostly from the default template except for the GetSignedMessage() i included.
Users will GET a signed message from this server which returns a ...
0
votes
2
answers
684
views
How to POST data from python and GET it in NodeJS?
I have a NodeJS server and I want to GET data that is coming from python with the POST method.
pythonData.js
const router = require('express').Router()
router.get("/data",(req,res)=>...
0
votes
1
answer
135
views
Same request in Node JS is failing in Electron
So I am using request module in a simple script I wrote. I sent a POST request to a website and I receive the correct status code (201), but if I run the script with electron (electron test.js) the ...
2
votes
0
answers
862
views
How to use two chained socks proxies for a request in nodejs
I am trying to achieve an experimental setup in nodejs as illustrated below:
https-server --> local socks5 proxy (Tor) --> my external socks5 proxy --> webserver.
The existing https-server ...
0
votes
1
answer
3k
views
AWS Lambda internal node module
As far as I know, there are node modules that are automatically installed by AWS Lambda.
Is it excluded if you know that the module included a request module?
If anyone knows about this part, I would ...
1
vote
1
answer
3k
views
Error when attempting to PUT file to URL with Node request
I am trying to PUT a file to an S3 pre-signed URL. Doing so with bash/cURL works fine but with Node I am getting the following error:
Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete]...
0
votes
1
answer
36
views
Requesting URL's one by one
I'm trying to get some data from a lot of URLs using 'request', but I can't manage to do it one url at a time.
I've tried to understand async/promises in order to make it work, but with no success. ...
-1
votes
1
answer
203
views
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 ...
0
votes
0
answers
36
views
Using request to make a POST HTTP request does not return a request.Response for the callback
I don't know why, but if I do a POST response using request(options,callback), no request.Response object is passed to the callback, I need the response object to check for the X-CSRF-TOKEN header if ...
0
votes
1
answer
201
views
Making a function that yields until a HTTP request finishes
I can be considered new to Node.JS so apologies, in here I am trying to make a function that yields code execution until the code finished making a HTTP request (using the "request" npm ...
0
votes
0
answers
277
views
What NodeJs does when too many requests performed?
For one of my tasks, I have to make too many requests to collect analytics. It's a search engine and for a valid reason, when somebody opens a page I must perform 6-8 requests to send different ...
1
vote
1
answer
817
views
Request succeeds with `request` but fails with `axios`
I have this microsoft graph authentication code, making what I think is the same request using axios and then using request. However, the axios request fails with 404, whereas the request request ...
0
votes
1
answer
122
views
Simple request returning error code ERR_UNESCAPED_CHARACTERS on a specific URL
Summary
The URL https://www.eponuda.com/graficke-kartice-cene/gigabyte-radeon-rx-6900-xt-16gb-gddr6-256-bit-gv-r69xtgaming-oc-16gd-graficka-kartica-cena-579068 returns error below, but other URLS ...
1
vote
1
answer
416
views
cURL to NodeJS Request with multipart/form-data
i need make request like this cURL:
curl -u [staff_email]:[api_key] -F "case[attachments][0]=@/path/to/file1.ext" -F "case[content]=I need help" -F "case[subject]=I need help&...
1
vote
0
answers
373
views
How to sign request object and send request?
i am using nodejs with node-fetch library to send a requests and node-http-signature package for sign request. Node-fetch has only one method to send request fetch(). How can i create request object,...
1
vote
1
answer
301
views
How to use variables as Node.js PUT request's json body
I'm new to programing and wanted to use the output from a child process as variable name, and this is how I failed:
var payload = outPutFromChildProcess;
{
var red = '{"sat": 254,"...
3
votes
0
answers
1k
views
How to define dynamic route path using regex in Nuxt's serverMiddleware?
I'm trying to define a regex based dynamic path in Nuxt's serverMiddleware, but I'm not able to figure out how to achieve it because in the doc also there is no any mention about dynamic route.
I want ...
1
vote
1
answer
1k
views
How to Store an respone into a variable nodejs request module
I am trying to store the response of an http request made using nodejs by request module but the problem is I can't acsess it after the request is completed in more details we can say after the ...
1
vote
1
answer
2k
views
How to make a bocking Request in NodeJS inside a http-proxy-middleware function?
I have a proxy server which modifies a specific type of POST Request before forwarding it to the Server.
The Modification requires me to make a request to another server in order to get the new value ...
1
vote
2
answers
1k
views
SOAP request in NodeJs returns a 500 Internal Server Error
I'm working on a little project at the moment, where I have to make a SOAP request to a SAP PCo Management Host Service.
I worked on a proof of concept and created a client side javascript document ...
2
votes
0
answers
435
views
how to increase tps (throughput) of my nodejs custom library which makes https request
Created a nodejs library which makes an https request with client certificates(.crt,.key files) to a different server to get the response. For making a request I used the "request" npm ...
0
votes
1
answer
462
views
Api for fetching github repos not working in Node.js
I have registered my app in Oauth in github
//@router GET api/profile/github/:githubUsername
//@desc get github profile
//@access public
router.get('/github/:githubUsername', (req,res)=>{
try {
...
0
votes
1
answer
1k
views
Performing an HTTP POST without encoding a particular parameter
I'm trying to talk to an undocumented third-party API using Node and the request module.
The following code generates the request:
request.post(
{
url: url,
headers: ...
1
vote
1
answer
531
views
node request vs python session
I have a working node.js script which written using the node.js request module.
I'm trying to convert this script to python with the session module.
I'm new to python and I followed the python docs as ...
-1
votes
1
answer
98
views
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 ...
1
vote
1
answer
3k
views
Web App call fails with "... Error code INTERNAL" with Custom API
I have a spreadsheet with a collection of cards, and I wrote a doGet() function to pick a random one, and return it to the user. When entering the Web App url into a web browser, the result appears ...
2
votes
1
answer
2k
views
Node.js server Error: Parse Error at socketOnEnd (_http_server.js:455:20)
I found our Node services intercommunication (using request) will occationally report this error:
Error: Parse Error
at socketOnEnd (_http_server.js:455:20)
at Socket.emit (events.js:203:15)
at ...
1
vote
1
answer
1k
views
Socket Hangup Error In Node JS On Force API Timeout
I am using request module in Node JS (v8.12) to call a third party API. Since the API is not very reliable and due to lack of better option I am timing out the call after 2 seconds in case if there is ...
1
vote
0
answers
719
views
How to Consume (SOAP) web service through NODEJS?
I am fairly new to nodejs, but i have some working experience in APIs, I can work with REST. But SOAP is a bit tricky.
I would like to consume a SOAP web service through nodejs. I am using soap-npm
...
0
votes
2
answers
121
views
How can I log parts of this GET requests json
Here is the code which I have written attempting to set a variable to each clothing item in the response.
const rp = require("request-promise-native");
const Logger = require("../tools/Logger");
...
0
votes
0
answers
769
views
How can I improve the elegancy of my code that uses axios?
I am trying to migrate from request to axios, since request has been deprecated.
Suppose that the url 'https://www.example.com' receives a post request with formdata that contains login information, ...
1
vote
1
answer
3k
views
Sending post formData with axios doesn't work, but with request does
I am trying to migrate from request to axios, since request has been deprecated.
Suppose that the url 'https://www.example.com' receives a post request with formdata that contains login information, ...
3
votes
1
answer
11k
views
UNABLE_TO_VERIFY_LEAF_SIGNATURE from request with Firebase functions node.js with Certificate (pfx)
I am trying to make a request from my Firebase function to a custom server that requires a certficate (.pfx). Based on this answer:
Upload TLS client certificate to Firebase cloud functions
My code ...
1
vote
2
answers
2k
views
Blank PDF with Express Request
I am getting a blank pdf when viewing in the browser and the request works because every time i search for a different pdf (localhost:3001/sample.pdf) the page numbers change, i have seen many ...
0
votes
2
answers
669
views
How to store cookies client-side from request module response
I'm creating a desktop app with electron using a private API. When I make request I got the set-cookie in res.headers but I don't know how to store it locally.
First I was storing every cookies in one ...
0
votes
1
answer
783
views
Firebase Auth REST API: OAuth sign-in with Twitter gives error 32 "could not authenticate you"
I'm writing a function in Node.js to log a user into Firebase using Twitter credentials, via the REST API (requests are made using the request library). I'm able to use the Twitter credentials to post ...
2
votes
2
answers
1k
views
NodeJS: Request Library - What is the Proper way to use userQueryString?
Within the Request Documentation it documents the setting "useQuerystring" with the following:
useQuerystring - if true, use querystring to stringify and parse querystrings, otherwise use qs (default:...
3
votes
1
answer
3k
views
GitHub API - "Get contents" continually returning 404 for valid path
I'm using probot => https://probot.github.io/
I've been developing a GitHub application that analyses a specific .json file in a repo for changes to date strings.
I do this by subscribing to the push ...
0
votes
1
answer
415
views
Unable to iterate the response body and manipulate/filter the response object using node JS
I have below code which is going to invoke REST endpoint and return response back. I just tried to print the response.body in the console and It works perfectly fine.
var express = require('express')...
3
votes
1
answer
8k
views
Stream binary file with http post
I'm using the request library to send a binary (pdf) file in the body of the request using http post (NOTE: This API does not accept multi-part forms). However, I have only been able to get it to ...
1
vote
2
answers
1k
views
NodeJS How can i read large CSV/Text files from remote server without saving it to disk?
I'm using the request module to GET a large CSV file with 70K rows.
However, only ~500 rows are shown in the body.
here is the code:
request({
url: "https://somedomain.com/path/to/file.csv",
...