Error: throw ECONNREFUSED on export._errnoException in TCPConnectWrap.afterConnect

I am trying to upload a file using url link, but I get the following error

throw er; // Unhandled event 'error'

Error: throw ECONNREFUSED at export._errnoException (util.js: 746: 11)

on TCPConnectWrap.afterConnect [as incomplete] (net.js: 1010: 19)

I used wget url, but I get lower

failed: connection rejected

it was said that for https we need a server certificate and show it when we authenticate it, but how to show the certificate and get the file

I used wirehark and saw that there was some problem with ssl shaking hands so I uploaded the server certificate, so what should I do now

My Nodejs Code

var https = require('https');
var fs = require('fs');

var file = fs.createWriteStream("file.xlsx");
var request = https.get("https://example.com/secure/attachment/206906/a-373_update.xlsx", function(response) {
  response.pipe(file);
});
+5
source
1

- ? - , , , NODE_DEBUG .

0

Source: https://habr.com/ru/post/1599793/


All Articles