FpHTTPClient.Get - skip first N byte, continue download lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- TCH · 2021-12-12 15:59 Is it possible to tell FpHTTPClient.Get to skip the first N byte? The server keeps disconnecting before the whole file is downloaded. How can i continue a download? ---------------------------------------------------------------------- mirce.vladimirov · 2021-12-12 17:08 Download the entire file and then take some processing steps to take whatever bytes you need. ---------------------------------------------------------------------- TCH · 2021-12-12 17:42 I said:QuoteThe server keeps disconnecting before the whole file is downloaded.How i am supposed to be able to download the whole file, if i am not able to download the whole file? The problem is: i need the entire file, but i only can download the first N bytes. ---------------------------------------------------------------------- balazsszekely · 2021-12-12 19:33 @TCH QuoteIs it possible to tell FpHTTPClient.Get to skip the first N byte? The server keeps disconnecting before the whole file is downloaded. How can i continue a download?It looks like a server issue for me, however the attached project is capable of resuming an aborted download, maybe you should give it a try. On windows you need the openssl libraries, you can download it from the following link:   32 bit: https://packages.lazarus- ide.org/openssl-1.0.2j-i386-win32.zip         64 bit: https://packages.lazarus- ide.org/openssl-1.0.2j-x64_86-win64.zip Put the dlls the same folder as your executable is. ---------------------------------------------------------------------- TCH · 2021-12-12 20:18 So, the solution is not to use FpHTTPClient.Get, but FpHTTPClient.HTTPMethod('GET' ... with allowed HTTP response codes 200 and 206 (success, partial success) and do FpHTTPClient.AddHeader('Range', 'bytes=' + IntToStr(cpos) + '-' + IntToStr(cpos + rlen)); before each request. It works flawlessly, thank you very much.