I am using /Document/{id}/Body endpoint to download the file.
The returned response headers don't contain a content-length header { which really is a norm, right ? } ...
Does anyone know why that is the case ? Any other work around ?
Content-Length is not required if the response uses a chunked transfer encoding. One possible work around would be to use a HTTP/1.0 request rather than 1.1 as i think chunked transfer is not a part of 1.0. But really you shouldn't be relying on the header, what do you need it for?
res.responseBody.size()
should suffice, though, shouldn't it?