1

I am writing an application that can download files from given URLs.

However, the files can be from many protolcols such as HTTP, HTTPS, FTP, FTPS, etc.

Is there a generic way to download files? (Using JavaScript/Node.js)

Note: I have checked this question but it requires http module which isn't the generic solution and cannot be used with HTTPS, FTP, FTPS, etc.

MongoLato
  • 351
  • 2
  • 20
  • Does this answer your question? [How to download a file with Node.js (without using third-party libraries)?](https://stackoverflow.com/questions/11944932/how-to-download-a-file-with-node-js-without-using-third-party-libraries) – toeffe3 Jan 16 '20 at 09:39
  • @toeffe3 Thank you for the thread. However, it requires the HTTP module which doesn't work with https/ftp/ftps. It'd be great if it's generic. – MongoLato Jan 16 '20 at 09:43
  • 1
    @toeffe3 I don't think you can issue an HTTP GET to resource behind `ftp://` protocol and expect a response. – VLAZ Jan 16 '20 at 09:43

0 Answers0