Original post

Hello there.

I’m trying to make a download manager as a hobby project to get more familiar with net/http package. So my simple workflow for downloading something is first of all send a HEAD request to get content-length then break it into 8 chunks for instance then make 8 requests with Range header and the chunked values as bytes range for each part and put all of them into a buffer and eventually write to the desired file(I know this may work efficiently only for small size files). What I’m want to understand is this approach right that making a bunch of requests for getting data because I’ve no idea how download managers do this stuff ?!

Any suggestions would be appreciated.

submitted by /u/Alireza_T
[link] [comments]