This example shows how to a from the web on to your local machine. By using io.Copy() and passing the response body directly in we stream the data to the and avoid having to load it all into the memory R1; it’s not a problem with small files, but it makes a difference when downloading large files.
We also have an example of downloading large files with progress reports.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here