Are there any suggestions about how to download large files in Haskell? I figure Http.Conduit is is the library is a good library for this. However, how does it solve this? Ther
Network.HTTP.Conduit
provides three functions for performing a request:
Out of the three functions, the first two functions will make the entire response body to live in memory. If you want to operate in constant memory, then use http
function. The http
function gives you access to a streaming interface through ResumableSource
The example you have provided in your code uses interleaved IO to write the response body to a file in constant memory space. So, you will not run out of memory when downloading a large file.