Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: have http_response::body() return file backed stream

$
0
0
Hi,

I have to download very large files (4gb+) and also need to be able to cancel the request, which I am currently doing by reading the body chunks at a time and checking if a cancel event occurred before each read.

I have looked at using set_response_stream() but this does not provide any way to cancel the processing of the response, I have to way for all 4gb+ to be written to a file.

I would like to be able to have the response be written to a file which can be returned from http_response::body() as an istream. Is there a way to do this? If not do you have any suggestions on how to download large files and be able to cancel the request?

Thanks,
Ryan

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>