Questions tagged [node-https]
53 questions
0
votes
1 answer
When is Node http request actually fired?
Is node http request actually fired after req.end or after http.request ?
Context: I am using node js http module and wanted to understand what happens between:
var req = http.request(options)
// Register handler events
req.end();
Can node open…

Mary123
- 11
- 4
0
votes
1 answer
Node Fetch resolve host like curl request
can we replicate curl resolve host in node-fetch or any other node http library.
curl https://www.example.net --resolve www.example.net:443:127.0.0.1

Faizan Ahmed
- 184
- 3
- 12
0
votes
1 answer
How to download an .xlsx file using nodejs
I'm trying to download a .xlsx file from a website through web scraping, I've done the entire process until I access the temporary url that the website generates for the download.
When I open the file url in the browser, the download starts…

Gianlucca Claudino
- 3
- 1
- 2
0
votes
1 answer
Get HTTP headers/body from async hook HTTPINCOMINGMESSAGE
I'm trying to get the HTTP headers and the HTTP body from the IncomingMessage instance provided by the async hook HTTPINCOMINGMESSAGE:
import asyncHooks = require("async_hooks");
import { IncomingMessage } from "http";
asyncHooks.createHook({
…

brillout
- 7,804
- 11
- 72
- 84
0
votes
1 answer
HTTP GET | POST from Serverless give timeout error and does not return anything
I am using aws serverless mongodb template which works fine with mongodb queries and other local processing
I want make http request to get some data for that i tried. http/http/axios/request
But it just returns me following timeout error
{
…

rohan padwalkar
- 99
- 3
0
votes
1 answer
nodejs http-proxy not passing URL
I'm using http-proxy module and I'm trying to send the request to port 1234 and gets its reply back.
But in the apache logs I can see that request is only to /. The documentation says to use toProxy: true in order to pass the URL but it isn't…

user13339470
- 1
- 1
0
votes
1 answer
Change User Agent When Adding Files via urlSource in js-ipfs
I have a function to add files in js-ipfs via URL.
async function addFile(url) {
try {
for await (const file of node.add(urlSource(url))) {
console.log('Hash for ' + url.substring(url.lastIndexOf('/') + 1));
}
}
catch(e) {
…

xd1936
- 1,038
- 2
- 9
- 27
0
votes
0 answers
Cannot transfer a file in Node.js using http module
I am trying to send and receive a file in a typical client/server interaction:
Client sends over a zip file.
Server receives and saves it.
Client
const options = {
hostname: "localhost",
port: 8080,
method: "POST",
headers: {
…

Andry
- 16,172
- 27
- 138
- 246
0
votes
1 answer
Why isn't timeout doing what I expect it to for https node module?
I have code like this:
const https = require('https');
const request = async (data, options) => {
return new Promise((resolve, reject) => {
const req = https.request(options, function(res) {
const chunks = [];
res.on('data',…

Dave Stein
- 8,653
- 13
- 56
- 104
0
votes
1 answer
The best way to summarize http returns on nodejs
Have to take multiple SOAP requests and need to take back all the returns together.
What I do now is:
for (let this_target of list_of_target)
{
const req = http.request(conn, (res) => {
let data='';
…

HufflepuffBR
- 443
- 3
- 15
0
votes
1 answer
How to limit size of chunk incoming from rest server on nodejs http module?
I am requesting a rest server from nodejs by using nodejs request module.
I want to cancel stream if incoming data size is out of allowed limit.the purpose here is to ensure that my network is not locked.
My code example is as follows;
var http =…

Baltazarr
- 35
- 1
- 10
0
votes
1 answer
module.export and global objects
I'm confused.
Occasionally when my web api receives data it mixes the data up between objects and it appears to me that the global object in the file is actually being persistent..
Here is the basic layout of the code
handlers.js
const something =…

Johnathan Enslin
- 255
- 4
- 13
0
votes
1 answer
Node.js https fails, whereas browser, `curl` & `wget` succeed?
Succeeding requests:
$ url='https://svn.tools.ietf.org/svn/tools/xml2rfc/trunk/cli/xml2rfc/data/xml2rfc.css'
$ curl "$url"
$ wget -qO - "$url"
$ python -c 'import webbrowser; webbrowser.open("'"$url"'", new=2)'
Failing request:
$ echo…

A T
- 13,008
- 21
- 97
- 158
0
votes
1 answer
How to handle http requests which are getting redirected as https using my nodejs-express app?
I am injecting some script tags in a website, with source such as http:localhost:3000/css/my-page-css.css . While its working on almost all sites, there's this particular website that is somehow sending all my http requests as https. How do I handle…

Tripti Rawat
- 645
- 7
- 19
0
votes
1 answer
Where should I put callback to return data after node https.request call?
I am trying to read the content of a request using node http native library
I want to make a POST request, which I already do successfully, but then use the saved chunks of the response to output them as whole using a callback on my lambda function.…

CoderRoller
- 1,239
- 3
- 22
- 39