Skip to main content
Question

UHHTP und chunked download

  • May 4, 2026
  • 0 replies
  • 17 views

Ingo Stiller
Forum|alt.badge.img+3

Guude

I was just trying to download large files using UHTTP: In the documentation, I found an option called "chunk" for UHTTP, along with an example:


-- Directly from the Uniface documentation --

Chunked Download

vUhttp->SET_FLAGS(8 ) ; GET send headers
vUhttp->DUMP_FILE_CONTENTS("your.zip", "chunk=256k")

repeat
vUhttp->GET_CONTENTS_INFO("range", vInfo)
putitem/id/case vHeaders, "Range", "%%vInfo"
vUhttp->SEND(vUrl, "GET", "", "", vHeaders, "", vResp)
vUhttp->DUMP_FILE_CONTENTS("", "")
until (<DefineCondition>)

vUhttp->CLOSE_FILE()

But that doesn't work. After a few "small" tests, I figured out that this loop isn't necessary at all; even with "chunked" mode, a single call to SEND(GET) and DUMP_FILE_CONTENTS is sufficient.
In what scenario is the example from the UnifAce documentation supposed to apply?