im a bit stuck with my project and I'am not finding the right answeres to my questions...
So first of all I have this client that is a linux machine and it pokes my server with curl trying to download this tar.gz file. On the nodejs server my purpose is to download this tar.gz file from third-party server with HTTP get and pass it to my client. So I have few things that I dont understand.
Firstly: Is the file that i am downloading from the third party server in the http responses body or does the response have a body when downloading a file?
Secondly: I don't want to save the file to my server, so how do I stream it to the clients http response. Is there a fileStreams that i should use or is there just regular streams.
At the moment I'am trying to pipe the third party response to the clients responses body. I've played around with the server and I've gotten some gibberish to my client. When I "file upload.tar.gz" I get that its data and not gzip. Is this the tar.gz file in different format? Am I doing wrong with the http request or is my stream piping causing this.
I would appreciate if someone could brief me a bit or point me to the right direction! :)